Bug 255778

Summary: Add customElements.getName method
Product: WebKit Reporter: Keith Cirkel <webkit>
Component: DOMAssignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa, twisniewski, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=232734
https://bugs.webkit.org/show_bug.cgi?id=257759
Bug Depends on:    
Bug Blocks: 154907    

Description Keith Cirkel 2023-04-21 04:37:46 PDT
I'm not sure if this is the right issue template, but I am trying to file implementer issues to get `customElements.getName()` defined. As a result of the WCCG F2F, the CG is interested in pursuing a method to get the name of a defined element. This is the result of that meeting. See https://github.com/WICG/webcomponents/issues/566 and https://github.com/whatwg/html/pull/9195 for more.
Comment 1 Ryosuke Niwa 2023-04-21 15:42:22 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13053
Comment 2 EWS 2023-04-22 12:27:46 PDT
Committed 263281@main (e2748d7c56a2): <https://commits.webkit.org/263281@main>

Reviewed commits have been landed. Closing PR #13053 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-04-22 12:28:19 PDT
<rdar://problem/108411398>
Comment 4 Thomas Wisniewski [:twisniewski] 2023-06-06 10:33:37 PDT
Pardon my ping of a closed bug, but I just tried to run the (not yet merged) WPTs from this patch on Safari Preview 171, and they aren't passing. I get this failure for all of the tests:

    assert_equals: expected (object) null but got (undefined) undefined

Is this expected?
Comment 5 Ryosuke Niwa 2023-06-06 12:10:04 PDT
(In reply to Thomas Wisniewski [:twisniewski] from comment #4)
> Pardon my ping of a closed bug, but I just tried to run the (not yet merged)
> WPTs from this patch on Safari Preview 171, and they aren't passing. I get
> this failure for all of the tests:
> 
>     assert_equals: expected (object) null but got (undefined) undefined
> 
> Is this expected?

Yes, that's expected. That semantics changed after I had landed WebKit code change. Will update WebKit's implementation shortly.