Conversation
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
ff4688a to
3ad2431
Compare
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
3ad2431 to
28bf12c
Compare
f02797a to
98b171e
Compare
foolip
left a comment
There was a problem hiding this comment.
Editorial review pass up to the CustomElementRegistry IDL block.
source
Outdated
| <li><dfn data-x="concept-document-type" data-x-href="https://dom.spec.whatwg.org/#concept-document-type">document type</dfn> concept</li> | ||
| <li><dfn data-x="concept-DocumentFragment-host" data-x-href="https://dom.spec.whatwg.org/#concept-documentfragment-host">host</dfn> concept</li> | ||
| <li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept, and its <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-delegates-focus">delegates focus</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals">available to element internals</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-clonable">clonable</dfn>, and <dfn data-x="shadow-serializable" data-x-href="https://dom.spec.whatwg.org/#shadowroot-serializable">serializable</dfn>.</li> | ||
| <li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept, and its <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-delegates-focus">delegates focus</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-available-to-element-internals">available to element internals</dfn>, <dfn data-x-href="https://dom.spec.whatwg.org/#shadowroot-clonable">clonable</dfn>, <dfn data-x="shadow-serializable" data-x-href="https://dom.spec.whatwg.org/#shadowroot-serializable">serializable</dfn>, <dfn data-x="shadow-root-custom-element-registry" data-x-href="https://whatpr.org/dom/1341.html#shadowroot-custom-element-registry">custom element registry</dfn>, and <dfn data-x-href="https://whatpr.org/dom/1341.html#shadowroot-keep-custom-element-registry-null">keep custom element registry null</dfn>.</li> |
There was a problem hiding this comment.
Comment to ensure that the URLs here change before this is merged.
| <dfn data-x="concept-node-clone-parent" data-x-href="https://dom.spec.whatwg.org/#clone-a-node-parent"><var>parent</var></dfn>, and the concept of | ||
| <dfn data-x="concept-node-clone-subtree" data-x-href="https://dom.spec.whatwg.org/#clone-a-node-subtree"><var>subtree</var></dfn>, | ||
| <dfn data-x="concept-node-clone-parent" data-x-href="https://dom.spec.whatwg.org/#clone-a-node-parent"><var>parent</var></dfn>, and | ||
| <dfn data-x="concept-node-clone-fallbackRegistry" data-x-href="https://dom.spec.whatwg.org/#clone-a-node-fallbackregistry"><var>fallbackRegistry</var></dfn>, and the concept of |
There was a problem hiding this comment.
Need to double check that this URL is correct before landing.
| attribute is a <span>boolean attribute</span>.</p> | ||
|
|
||
| <p>The <dfn element-attr for="template"><code | ||
| data-x="attr-template-shadowrootcustomelementregistry">shadowrootcustomelementregistry</code></dfn> |
There was a problem hiding this comment.
It looks like this the longest attribute name so far, 31 characters. Maybe that's right, but have you thought about shorter names that you also think are OK?
There was a problem hiding this comment.
It's not ideal, but anything else would end up being inconsistent with the rest of the APIs.
There was a problem hiding this comment.
I guess it will be a fun piece of trivia to know if nothing else :)
| <p>To <dfn export>look up a custom element definition</dfn>, given null or a | ||
| <code>CustomElementRegistry</code> object <var>registry</var>, string-or-null |
There was a problem hiding this comment.
This style seems more common for nullable objects:
| <p>To <dfn export>look up a custom element definition</dfn>, given null or a | |
| <code>CustomElementRegistry</code> object <var>registry</var>, string-or-null | |
| <p>To <dfn export>look up a custom element definition</dfn>, given a | |
| <code>CustomElementRegistry</code>-or-null <var>registry</var>, string-or-null |
(I found NavigationFocusReset-or-null as the example follow.)
| DOMString? <span data-x="dom-CustomElementRegistry-getName">getName</span>(CustomElementConstructor constructor); | ||
| <span data-x="idl-Promise">Promise</span><<span>CustomElementConstructor</span>> <span data-x="dom-CustomElementRegistry-whenDefined">whenDefined</span>(DOMString name); | ||
| [<span>CEReactions</span>] undefined <span data-x="dom-CustomElementRegistry-upgrade">upgrade</span>(<span>Node</span> root); | ||
| <span data-x="dom-CustomElementRegistry">constructor</span>(); |
There was a problem hiding this comment.
For other reviewers: It's hard to tell from the diff, so the new things here are the constructor and the initialize() method.
| <p><span data-x="map remove">Remove</span> <var>registry</var>'s <span>relevant global | ||
| object</span>'s <span>active custom element constructor map</span>[<var>C</var>].</p> | ||
|
|
||
| <p class="note">This is a no-op if <var>C</var> immediately calls <code |
There was a problem hiding this comment.
Is the case where super() isn't called covered by the tests?
There was a problem hiding this comment.
| <li><p>If <var>current node</var>'s <span data-x="element-custom-element-registry">custom | ||
| element registry</span> is not <var>shadow</var>'s <span | ||
| data-x="shadow-root-custom-element-registry">custom element registry</span>, then append | ||
| "<code data-x=""> shadowrootcustomelementregistry=""</code>".</p></li> |
There was a problem hiding this comment.
How does this fit together with the extension point, the reason that the IDL attribute reflects as a string and not a boolean? Shouldn't this preserve the attribute value for consistency / to avoid a change in behavior later?
There was a problem hiding this comment.
It seems okay for serialization to change at that point.
|
OK, so the main thing I'm left wondering point is the reasoning behind If the value is the empty string, Maybe it makes sense if I learn more about how this might be extended in the future. |
HTML PR: whatwg/html#10869. Tests: ... Closes #1339.
8ef7c76 to
0bb0d3f
Compare
|
About |
| </li> | ||
| </ol> | ||
|
|
||
| <p class="note">Once the custom element registry of a node is initialized to a |
|
I've finished editorial review of this and whatwg/dom#1341 now, but I'd like @mfreed7 to weigh in to confirm implementer interest on behalf of Chromium. |
Thanks for the review! You can mark Chromium as interested. |
…gistry into registries And rename away from .tentative for the Revamped Scoped Custom Element Registry tests as whatwg/html#10869 and whatwg/dom#1341 are about to land.
…gistry into registries And rename away from .tentative for the Revamped Scoped Custom Element Registry tests as whatwg/html#10869 and whatwg/dom#1341 are about to land.
HTML PR: whatwg/html#10869. Tests: web-platform-tests/wpt#50790, web-platform-tests/wpt#50860, and web-platform-tests/wpt#51953. Closes #1339.
This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk> Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Keith Cirkel <chromium@keithcirkel.co.uk> Cr-Commit-Position: refs/heads/main@{#1446589}
This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk> Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Keith Cirkel <chromium@keithcirkel.co.uk> Cr-Commit-Position: refs/heads/main@{#1446589}
This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk> Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Keith Cirkel <chromium@keithcirkel.co.uk> Cr-Commit-Position: refs/heads/main@{#1446589}
This corresponds to a couple of spec changes: whatwg/html#10869 whatwg/dom#1341 The regressions are unfortunate and need looking into. The spec issues I've reported mostly have fixes PRed too. Just going to wait for those.
This corresponds primarily to these spec changes, plus a few follow-up spec fixes: whatwg/dom#1341 whatwg/html#10869 Still looking into the test regressions. Those might be spec issues but I'm currently assuming they're me issues. :^)
…egistry and custom-element-registry into registries, a=testonly Automatic update from web-platform-tests custom-elements: merge revamped-scoped-registry and custom-element-registry into registries And rename away from .tentative for the Revamped Scoped Custom Element Registry tests as whatwg/html#10869 and whatwg/dom#1341 are about to land. -- wpt-commits: 7087b359a1e2e306db934e5ff11218bd871cb228 wpt-pr: 51953
…ed registry, a=testonly Automatic update from web-platform-tests Scaffold out basic IDL for revamped scoped registry This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk> Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Keith Cirkel <chromium@keithcirkel.co.uk> Cr-Commit-Position: refs/heads/main@{#1446589} -- wpt-commits: 9546e2007adb73a3545fb61a5e5c8f754c6587e4 wpt-pr: 51977
…egistry and custom-element-registry into registries, a=testonly Automatic update from web-platform-tests custom-elements: merge revamped-scoped-registry and custom-element-registry into registries And rename away from .tentative for the Revamped Scoped Custom Element Registry tests as whatwg/html#10869 and whatwg/dom#1341 are about to land. -- wpt-commits: 7087b359a1e2e306db934e5ff11218bd871cb228 wpt-pr: 51953
…ed registry, a=testonly Automatic update from web-platform-tests Scaffold out basic IDL for revamped scoped registry This implements the IDL definitions per the spec issue[1], however all methods are basic stubs and do not execute any logic - the logic will come with later patches. I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/um-9YjJWyEQ/m/MhKN0L7FAgAJ Spec PRs: HTML: whatwg/html#10869 DOM: whatwg/dom#1341 [1]: whatwg/html#10854 Bug: 409577162 Change-Id: Ieee709ff15c13bdd0b1d7598e27031867062b592 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6443776 Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: Keith Cirkel <chromium@keithcirkel.co.uk> Commit-Queue: David Baron <dbaron@chromium.org> Auto-Submit: Keith Cirkel <chromium@keithcirkel.co.uk> Cr-Commit-Position: refs/heads/main@{#1446589} -- wpt-commits: 9546e2007adb73a3545fb61a5e5c8f754c6587e4 wpt-pr: 51977
Please do not comment directly on this PR unless asked. It's a big change and we want to keep it manageable. Use #10854 instead.
DOM PR: whatwg/dom#1341.
Tests: web-platform-tests/wpt#50790
(See WHATWG Working Mode: Changes for more details.)
/custom-elements.html ( diff )
/document-lifecycle.html ( diff )
/document-sequences.html ( diff )
/dom.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/parsing.html ( diff )
/scripting.html ( diff )