Skip to content

Add test for CustomElementRegistry getName interface#39640

Closed
keithamus wants to merge 2 commits into
web-platform-tests:masterfrom
keithamus:add-test-for-customelementregistry-getname-interface
Closed

Add test for CustomElementRegistry getName interface#39640
keithamus wants to merge 2 commits into
web-platform-tests:masterfrom
keithamus:add-test-for-customelementregistry-getname-interface

Conversation

@keithamus
Copy link
Copy Markdown
Member

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.

Comment thread custom-elements/CustomElementRegistry.html
Comment thread custom-elements/CustomElementRegistry.html Outdated
Comment thread custom-elements/CustomElementRegistry.html
Comment thread custom-elements/CustomElementRegistry.html Outdated
Copy link
Copy Markdown
Contributor

@rniwa rniwa left a comment

Choose a reason for hiding this comment

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

Please address above comments.

@keithamus
Copy link
Copy Markdown
Member Author

@rniwa above comments have been addressed, I believe.

@keithamus
Copy link
Copy Markdown
Member Author

Closed by #39709

@keithamus keithamus closed this Jun 15, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants