v134 · dom

Select parser relaxation

This change makes the HTML parser allow additional tags in <select> besides <option>, <optgroup>, and <hr>.

concepts

  1. Select Parser Relaxation

    HTML parser now allows non-option content inside <select>. Required for customizable selects with rich option content.

  2. Legacy vs relaxed parser

    The whatwg/html bug this fixed: paste a <select> with wrapper divs and see the relaxed-parser tree, the legacy tree, and how each one renders.

  3. DOM Tree X-Ray

    Paste any <select>-containing HTML. Trees from both parsers shown side-by-side with a render preview and a verdict on whether your markup survives.

  4. Custom Option Builder

    Build a <select> with color swatches and badges inside options. The relaxed HTML parser keeps the injected divs and spans — Chrome 134+ shows the DOM tree with non-option elements intact.

  5. Flagged country picker

    Flag emojis and country names sit inside <span> elements inside each <option>. The legacy parser strips those spans silently, leaving empty options. Chrome 134's relaxed parser keeps them intact. Switch between region filters and see the DOM tree comparison — legacy vs relaxed — side by side.

why it shipped

Making these changes to allow additional tags in the select element is required in order to support the customizable select element, which is going to render additional tags besides option/optgroup/hr.

references