Custom elements: implement ElementInternals/disabledFeatures/element.attachInternals()
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: d, Assigned: jdai)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
Spec:
- Some steps of https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-define for disabledFeatures
- Step 3 of https://dom.spec.whatwg.org/#dom-element-attachshadow for disabledFeatures = ['shadow'] specifically
- https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface for attachInternals() and the (empty-for-now) ElementInternals class
Tests:
- https://github.com/web-platform-tests/wpt/blob/master/shadow-dom/Element-interface-attachShadow-custom-element.html
- https://github.com/web-platform-tests/wpt/blob/master/custom-elements/HTMLElement-attachInternals.html
A separate bug will be filed for form-associated custom elements, which will make ElementInternals not empty. But this seems like a separable chunk of work.
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
- Introduce
dom.webcomponents.elementInternals.enabled
for custom element's elementInternals. - Implement disabledFeatures static field and disableInternals.
- Refactor get observedAttributes sequence.
Assignee | ||
Comment 3•5 years ago
|
||
Assignee | ||
Comment 4•5 years ago
|
||
ElementInternals class is empty-for-now.
Pushed by jdai@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f26d61e06a9d Implement custom element disabledFeatures and disableInternals; r=smaug,edgar https://hg.mozilla.org/integration/autoland/rev/5f8c6c9f2d36 Implement disableShadow; r=smaug,edgar https://hg.mozilla.org/integration/autoland/rev/27a01989152a Implement element.attachInternals; r=smaug,edgar
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/20196 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 11•5 years ago
|
||
Backed out 3 changesets (bug 1552313) for WPT failures in custom-elements/CustomElementRegistry.html. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=275630088&repo=autoland&lineNumber=14029
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=27a01989152a79ebe94496525650be603eb38f4d
Backout:
https://hg.mozilla.org/integration/autoland/rev/ac493f0eacfc3eef5e66f432603261b768fa7800
Upstream PR was closed without merging
Assignee | ||
Comment 13•5 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bb4d331f5a9897c7f66ccf41351be63652dfcfeb
Comment 14•5 years ago
|
||
Pushed by jdai@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/055e0a0e4bf0 Implement custom element disabledFeatures and disableInternals; r=smaug,edgar https://hg.mozilla.org/integration/autoland/rev/1f661e376de9 Implement disableShadow; r=smaug,edgar https://hg.mozilla.org/integration/autoland/rev/e6b60876e668 Implement element.attachInternals; r=smaug,edgar
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Comment 16•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/055e0a0e4bf0
https://hg.mozilla.org/mozilla-central/rev/1f661e376de9
https://hg.mozilla.org/mozilla-central/rev/e6b60876e668
Upstream PR merged by moz-wptsync-bot
Comment 18•4 years ago
|
||
Has there been any recent progress made on supporting form associated custom elements?
I enabled the elementInternals configuration flag but calling form.validate() does not invoke my web components checkValidity() function nor does form.reset() invoke the component's formResetCallback() method. Also form.elements.namedItem() does not include my form associated components either.
I am successfully using form associated components in Chrome and since I can't find a pollyfill available for this functionality I am wondering if this support is forthcoming or if I should try to apply workarounds to support Firefox.
Comment 19•4 years ago
|
||
I also wanted to check in on the progress here. More and more standards are being discussed as extensions of ElementInternals (declarative shadow dom, custom pseudo selectors, etc.). The lack of support for these APIs in Firefox is going to create an increasingly difficult problem for developers. We have many hacks to work around this in our form components already...and we spend a lot of time addressing related issues.
Comment 20•3 years ago
|
||
(In reply to rob from comment #19)
I also wanted to check in on the progress here. More and more standards are being discussed as extensions of ElementInternals (declarative shadow dom, custom pseudo selectors, etc.). The lack of support for these APIs in Firefox is going to create an increasingly difficult problem for developers. We have many hacks to work around this in our form components already...and we spend a lot of time addressing related issues.
@rob, throwing out a wild idea: could Microsoft help out the Mozilla folks with this? Microsoft browser teams contribute to Chromium, perhaps you could rally people to help to scratch this itch as well so your team could drop the hacks and workarounds?
Description
•