-
Notifications
You must be signed in to change notification settings - Fork 285
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
Change handling of is="" in element creation and cloning #566
Conversation
Part of fixing whatwg/html#3402. This changes two things: * It fixes the cloning steps to consult the internal is value, instead of the is="" content attribute. * It removes the step from createElement()/createElementNS() that would insert an is="" attribute in the created element, as we've now decided that is="" is a way of communicating to the parser, and not a general-purpose indicator of customized built-in-ness.
This follows the DOM changes in whatwg/dom#566, and is part of fixing #3402. The normative changes are to the serialization algorithm, which now writes out the element's is value as its is="" attribute, if no actual is="" attribute is present. The rest of the changes are to introductory text about customized built-in elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized that the other nice thing here is that we don't get non-observable attribute mutation records.
Yes. I'll add/update tests when I'll update Chromium implementation. |
This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value."
Test PR: web-platform-tests/wpt#9505 |
This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value."
This follows the DOM changes in whatwg/dom#566, and is part of fixing #3402. The normative changes are to the serialization algorithm, which now writes out the element's is value as its is="" attribute, if no actual is="" attribute is present. The rest of the changes are to introductory text about customized built-in elements. Tests: web-platform-tests/wpt#9508
… be cloneable. This follows a DOM specification change; whatwg/dom#566 - createElement() and createElementNS() don't add "is" content attribute - cloneNode() should refer "is value" instead of "is" content attribute value. This CL adds a data member for "is value" to ElementRareData, and initialize it in "create an element" implementation. Note that new failure for serializing-html-fragments.html is expected. It will be fixed for crbug.com/813675. Bug: 807871 Change-Id: Ie7c5f6282dd1a84a3d159b89d0d4efd72b0ddee0 Reviewed-on: https://chromium-review.googlesource.com/925901 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#537736}
…ribute behavior changes, a=testonly Automatic update from web-platform-tests[custom-elements] Some fixes for "is" attribute behavior changes This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value." wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505
So if there is definition for custom element (non built-in), is value is set to null, but if there isn't definition yet, is value can be possibly set to non-null. That is weird. |
When doing something like 'new CustomBuiltIn()', is value isn't set, so cloning the element doesn't work. |
Fixes #3776. Tests: already present in web-platform-tests/wpt@1e4fe87#diff-d2e09155cd799584f19630072186bff5, as we forgot to update this part of the HTML Standard when we merged whatwg/dom#566.
This follows the DOM changes in whatwg/dom#566, and is part of fixing whatwg#3402. The normative changes are to the serialization algorithm, which now writes out the element's is value as its is="" attribute, if no actual is="" attribute is present. The rest of the changes are to introductory text about customized built-in elements. Tests: web-platform-tests/wpt#9508
Fixes whatwg#3776. Tests: already present in web-platform-tests/wpt@1e4fe87#diff-d2e09155cd799584f19630072186bff5, as we forgot to update this part of the HTML Standard when we merged whatwg/dom#566.
…ribute behavior changes, a=testonly Automatic update from web-platform-tests[custom-elements] Some fixes for "is" attribute behavior changes This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value." wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 UltraBlame original commit: a8c46b6a1c20e8302d3adf8e9470037fd58cbb1d
…ribute behavior changes, a=testonly Automatic update from web-platform-tests[custom-elements] Some fixes for "is" attribute behavior changes This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value." wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 UltraBlame original commit: a8c46b6a1c20e8302d3adf8e9470037fd58cbb1d
…ribute behavior changes, a=testonly Automatic update from web-platform-tests[custom-elements] Some fixes for "is" attribute behavior changes This is for whatwg/dom#566. - document.createElement() and createElementNS() don't add "is" content attribute. - cloneNode() should clone custom elements even if they have no "is" content attributes or have "is" content attribute inconsistent with "is value." wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 wpt-commits: 1e4fe87a7f01c0b5c614c8f601ffa68b4a00662a wpt-pr: 9505 UltraBlame original commit: a8c46b6a1c20e8302d3adf8e9470037fd58cbb1d
Part of fixing whatwg/html#3402. This changes two things:
This is coupled with a HTML change I will be submitting shortly, to the serializer (and to several examples).
@tkent-google, will you be able to help with tests for this? I am happy to review.
Preview | Diff