Closed Bug 1419323 Opened 7 years ago Closed 7 years ago

Fix custom element WPT failures at CustomElementRegistry.html

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1462453

People

(Reporter: jdai, Assigned: mrbkap)

References

Details

Attachments

(2 files)

Priority: -- → P2
Priority: P2 → P3
One of the failures here (the "customElements.define must get callbacks of the constructor prototype") is because the custom elements spec requires that we retrieve the lifetime callbacks in a specific order [1] (step 10.3-4). Internally, we use a WebIDL dictionary to store the lifetime callbacks; however, WebIDL dictionaries specify that their keys should be retrieved in alphabetical order. I can pretty write custom code to retrieve the lifetime callbacks in the custom order, but I was wondering if it would be worth changing the spec to retrieve the callbacks in alphabetical order (which would save us some code and also makes a bit more sense to me). What do you think, Olli? [1] https://w3c.github.io/webcomponents/spec/custom/#dom-customelementregistry-define
Assignee: nobody → mrbkap
Flags: needinfo?(bugs)
oh, that sounds like a bug-ish in the spec. Better to follow the common web conventions, so WebIDL. Please use https://html.spec.whatwg.org/#custom-elements as the spec.
Flags: needinfo?(bugs)
Almost all of the remaining failures in this test are due to the property order issue. There's one easy fix that's also needed and I'll attach it here next.
Attached patch Fixing the testSplinter Review
This makes the test expect the callbacks to be retrieved in alphabetical order. MozReview-Commit-ID: DjyjQVKwQOb
Comment on attachment 8960821 [details] Bug 1419323 - Remove some unnecessary code. https://reviewboard.mozilla.org/r/229560/#review235396 ::: commit-message-6d0f8:3 (Diff revision 1) > +Bug 1419323 - Remove some unnecessary code. r=smaug > + > +This code appears to be trying to verify that all of the callbacks exist and Not really. It does the checks only if value isn't undefined.
Attachment #8960821 - Flags: review?(bugs) → review+
I guess this is now sort of a dup of bug 1462453.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: