-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
What is the issue with the HTML Standard?
The recent changes in #10548 modify the parsing behavior so that a selected OPTION element will be appropriately cloned into the appropriate SELECTEDCONTENT. However, there seems to be a discrepancy between how the rules are written and how Chrome currently implements this.
(Given that this is currently a Chrome-only feature in production it’s unclear to me how other standards-compliant browsers and parsers will handle it).
The only reference to run the maybe clone an option into selectedcontent
algorithm is found in the section for an end tag whose name is OPTION
. However:
- Chrome clones the appropriate OPTION into a SELECTEDCONTENT even when no end tag whose name is
OPTION
appears. - It is reasonable and preferable that the cloning operation runs regardless of the particular tokens in the markup.
Since the cloning probably needs to occur whenever popping any OPTION
element off of the stack of open elements, it needs to run both during generate implied end tags
and also when performing any pop operation on the stack of open elements.