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

Update customized built-in elements is="" interaction #3444

Merged
merged 3 commits into from
Feb 14, 2018

Conversation

domenic
Copy link
Member

@domenic domenic commented Feb 2, 2018

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 )

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.
@domenic domenic added topic: custom elements Relates to custom elements (as defined in DOM and HTML) needs tests Moving the issue forward requires someone to write tests labels Feb 2, 2018
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 (&quot;).</p>
Copy link
Member

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
&lt;/script></pre>
</div>

<p><dfn id="escapingString">Escaping a string</dfn> (for the purposes of the algorithm above)
Copy link
Member

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
Copy link
Member

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?&lt;/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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

element element → element

domenic added a commit to whatwg/dom that referenced this pull request Feb 14, 2018
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
tkent-google added a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2018
@tkent-google
Copy link
Contributor

WPT PR for this PR: web-platform-tests/wpt#9508

@domenic domenic removed the needs tests Moving the issue forward requires someone to write tests label Feb 14, 2018
@domenic domenic merged commit e5dc6bf into master Feb 14, 2018
@domenic domenic deleted the cbie-htmlconstructor-fix branch February 14, 2018 02:31
domenic pushed a commit to web-platform-tests/wpt that referenced this pull request Feb 14, 2018
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 1, 2018
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: custom elements Relates to custom elements (as defined in DOM and HTML)
Development

Successfully merging this pull request may close these issues.

4 participants