Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upouterHTML isn't always serializing is= when it should #24994
Comments
|
The second case is https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments 4.2. The first case is this code: |
|
https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors 7.8 is where the is value gets set. It looks like this involves looking at the "newTarget" value from within a codegen-defined constructor, much like #25394 needs. |
This is WPT custom-elements/parser/serializing-html-fragments.html; 2 out of 3 cases fail.
In the first case, an element is created from a custom element constructor and added to the DOM. Its serialization is missing the is= attribute.
In the second case, an element is created with a regular constructor and an additional is attribute, with the name in the is= string not being a registered custom element class. The serialization omits the ineffectual is= attribute and WPT expects to include it.
In the third case, an custom element has .setAttribute('is',...) called on it for a different string than its real registered class name; the serialization correctly reflects the change.
Safari fails the same two cases as Servo, apparently in the same way.