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 1 open bug)
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•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
- Introduce
dom.webcomponents.elementInternals.enabledfor custom element's elementInternals. - Implement disabledFeatures static field and disableInternals.
- Refactor get observedAttributes sequence.
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
ElementInternals class is empty-for-now.
Comment 11•6 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
| Assignee | ||
Comment 13•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bb4d331f5a9897c7f66ccf41351be63652dfcfeb
Comment 14•6 years ago
|
||
Comment 16•6 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
Comment 18•6 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•5 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•4 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
•