Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outerHTML isn't always serializing is= when it should #24994

Open
pshaughn opened this issue Dec 2, 2019 · 2 comments
Open

outerHTML isn't always serializing is= when it should #24994

pshaughn opened this issue Dec 2, 2019 · 2 comments

Comments

@pshaughn
Copy link
Member

@pshaughn pshaughn commented Dec 2, 2019

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.

@jdm jdm added this to To do in web-platform-test failures via automation Dec 2, 2019
@pshaughn
Copy link
Member Author

@pshaughn pshaughn commented Jan 2, 2020

The second case is https://html.spec.whatwg.org/multipage/parsing.html#serialising-html-fragments 4.2.

The first case is this code:
https://github.com/web-platform-tests/wpt/blob/fda9fa30b9c18f3689f09384c0d4f104c6e6fd4d/custom-elements/parser/serializing-html-fragments.html#L12-L14
I haven't yet found the specification that explains when or how calling the registered constructor sets either the is content attribute or the is value.

@pshaughn
Copy link
Member Author

@pshaughn pshaughn commented Jan 2, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.