Repository navigation
Add customElements.getName(constructor) - #9195
Merged
zcorpan merged 8 commits intoJun 30, 2023
Merged
Conversation
In CustomElements v0 you could use the `.name` field to get the defined tag name, but CustomElements v1 does not offer such a field. `localName` can be used within an instance but this prohibits use in, for example, static methods. This was discussed in the WCCG F2F, tracked in WICG/webcomponents#566. The conclusion of the F2F was to write up a spec change and WPT tests.
rniwa
reviewed
Apr 21, 2023
annevk
reviewed
Apr 24, 2023
annevk
reviewed
Apr 24, 2023
keithamus
marked this pull request as ready for review
June 8, 2023 22:12
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Jun 17, 2023
The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1
aarongable
pushed a commit
to chromium/chromium
that referenced
this pull request
Jun 20, 2023
The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Jun 20, 2023
The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209}
chromium-wpt-export-bot
pushed a commit
to web-platform-tests/wpt
that referenced
this pull request
Jun 20, 2023
The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209}
This was referenced Jun 21, 2023
Member
Author
|
@annevk @rniwa @zcorpan how happy are we to merge this? Is there a gate before doing so? I2S on Chrome has been posted: https://groups.google.com/a/chromium.org/g/blink-dev/c/vOadD_Up5B0/m/3Ezs2SxRDAAJ and Safari TP includes it. Is there anything more I can do? |
mnutt
pushed a commit
to movableink/webkit
that referenced
this pull request
Jun 28, 2023
https://bugs.webkit.org/show_bug.cgi?id=257759 Reviewed by Chris Dumez. Update the implementation of CustomElementsRegistry.prototype.getName to match the latest PR. Namely, it now returns DOMString? instead of (DOMString or undefined): whatwg/html#9195 web-platform-tests/wpt#39640 * LayoutTests/imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/custom-elements/CustomElementRegistry.html: * Source/WebCore/dom/CustomElementRegistry.cpp: (WebCore::CustomElementRegistry::getName): * Source/WebCore/dom/CustomElementRegistry.h: * Source/WebCore/dom/CustomElementRegistry.idl: Canonical link: https://commits.webkit.org/264916@main
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this pull request
Jun 28, 2023
…ts to a tentative test file, a=testonly Automatic update from web-platform-tests Move CustomElementRegistry.getName() tests to a tentative test file The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209} -- wpt-commits: 99ee1f53f877610adf1f29399ea9660905e6d7a9 wpt-pr: 40606
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified-and-comments-removed
that referenced
this pull request
Jul 1, 2023
…ts to a tentative test file, a=testonly Automatic update from web-platform-tests Move CustomElementRegistry.getName() tests to a tentative test file The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <xiaochenghchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Xiaocheng Hu <xiaochenghchromium.org> Cr-Commit-Position: refs/heads/main{#1160209} -- wpt-commits: 99ee1f53f877610adf1f29399ea9660905e6d7a9 wpt-pr: 40606 UltraBlame original commit: ff55e5770af6e99f114c0593f02f296318fa584f
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-comments-removed
that referenced
this pull request
Jul 1, 2023
…ts to a tentative test file, a=testonly Automatic update from web-platform-tests Move CustomElementRegistry.getName() tests to a tentative test file The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <xiaochenghchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Xiaocheng Hu <xiaochenghchromium.org> Cr-Commit-Position: refs/heads/main{#1160209} -- wpt-commits: 99ee1f53f877610adf1f29399ea9660905e6d7a9 wpt-pr: 40606 UltraBlame original commit: ff55e5770af6e99f114c0593f02f296318fa584f
gecko-dev-updater
pushed a commit
to marco-c/gecko-dev-wordified
that referenced
this pull request
Jul 1, 2023
…ts to a tentative test file, a=testonly Automatic update from web-platform-tests Move CustomElementRegistry.getName() tests to a tentative test file The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <xiaochenghchromium.org> Reviewed-by: Mason Freed <masonfchromium.org> Commit-Queue: Xiaocheng Hu <xiaochenghchromium.org> Cr-Commit-Position: refs/heads/main{#1160209} -- wpt-commits: 99ee1f53f877610adf1f29399ea9660905e6d7a9 wpt-pr: 40606 UltraBlame original commit: ff55e5770af6e99f114c0593f02f296318fa584f
foolip
added a commit
to web-platform-tests/wpt
that referenced
this pull request
May 16, 2024
This test was made tentative in #40606 because the spec change hadn't landed, but it now has: whatwg/html#9195
Closed
jwidar
pushed a commit
to jwidar/LatencyZeroGithub
that referenced
this pull request
Sep 16, 2025
…ts to a tentative test file, a=testonly Automatic update from web-platform-tests Move CustomElementRegistry.getName() tests to a tentative test file The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209} -- wpt-commits: 99ee1f53f877610adf1f29399ea9660905e6d7a9 wpt-pr: 40606
benji-cannot-code
pushed a commit
to benji-cannot-code/fast-vc-chromium-benchmark-run-4
that referenced
this pull request
Sep 25, 2026
The spec change [1] hasn't landed yet, so the tests can only be tentative. This also prevents affecting interop2023 [2]. [1] whatwg/html#9195 [2] web-platform-tests/interop#358 Bug: 1435389 Change-Id: I1e35d7f06bcf2b005304cdc182a67cfa69b74de1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4621660 Auto-Submit: Xiaocheng Hu <[email protected]> Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Xiaocheng Hu <[email protected]> Cr-Commit-Position: refs/heads/main@{#1160209}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In CustomElements v0 you could use the
.namefield to get the defined tag name, but CustomElements v1 does not offer such a field.localNamecan be used within an instance but this prohibits use in, for example, static methods.This was discussed in the WCCG F2F, tracked in
WICG/webcomponents#566. The conclusion of the F2F was to write up a spec change and WPT tests.
Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …(See WHATWG Working Mode: Changes for more details.)
/acknowledgements.html ( diff )
/custom-elements.html ( diff )