-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update customized built-in elements is="" interaction #3444
Conversation
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.
source
Outdated
data-x="">is="</code>", followed by <var>current node</var>'s <span | ||
data-x="concept-element-is-value"><code data-x="">is</code> value</span> <span | ||
data-x="escaping a string">escaped as described below</span> in <i>attribute mode</i>, | ||
followed by a U+0022 QUOTATION MARK character (").</p> |
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.
You need to start with U+0020 SPACE.
source
Outdated
</script></pre> | ||
</div> | ||
|
||
<p><dfn id="escapingString">Escaping a string</dfn> (for the purposes of the algorithm above) |
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.
Too much indentation.
source
Outdated
through serialize-parse roundtrips.</p> | ||
|
||
<div class="example"> | ||
<p>When creating a <span>customized built-in element</span> via the parser, a developer uses the <code |
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.
Too much indentation.
source
Outdated
@@ -65645,20 +65645,29 @@ document.body.appendChild(flagIcon)</pre> | |||
me?</plastic-button></code> will simply create an <code>HTMLElement</code> with no special | |||
behavior.</p> | |||
|
|||
<p>If you need to create a type-extended element programmatically, you can use the following form | |||
of <code data-x="dom-Document-createElement">createElement()</code>:</p> | |||
<p>If you need to create a customized built-in element element programmatically, you can use the |
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.
element element → element
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. See also whatwg/html#3444 for the other half of the fix. Tests: web-platform-tests/wpt#9505
WPT PR for this PR: web-platform-tests/wpt#9508 |
…tests, a=testonly Automatic update from web-platform-tests[custom-elements] Add HTML serialization tests This is for whatwg/html#3444 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508
…tests, a=testonly Automatic update from web-platform-tests[custom-elements] Add HTML serialization tests This is for whatwg/html#3444 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 UltraBlame original commit: bbea3b6d26ec8ffb62e798a31c019e10454115e0
…tests, a=testonly Automatic update from web-platform-tests[custom-elements] Add HTML serialization tests This is for whatwg/html#3444 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 UltraBlame original commit: bbea3b6d26ec8ffb62e798a31c019e10454115e0
…tests, a=testonly Automatic update from web-platform-tests[custom-elements] Add HTML serialization tests This is for whatwg/html#3444 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 wpt-commits: d0114efdde520f9aa003ce42c85ef134f01ad691 wpt-pr: 9508 UltraBlame original commit: bbea3b6d26ec8ffb62e798a31c019e10454115e0
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 for this will presumably be done at the same time as those for the DOM changes.
/custom-elements.html ( diff )
/parsing.html ( diff )