Closed Bug 1552313 Opened 5 years ago Closed 5 years ago

Custom elements: implement ElementInternals/disabledFeatures/element.attachInternals()

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: d, Assigned: jdai)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

Spec:

Tests:

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.

Blocks: 1552327
Priority: -- → P3
Assignee: nobody → jdai
Status: NEW → ASSIGNED
Depends on: 1556334
Depends on: 1556337
Depends on: 1556338
Blocks: 1588763
  • Introduce dom.webcomponents.elementInternals.enabled for custom element's elementInternals.
  • Implement disabledFeatures static field and disableInternals.
  • Refactor get observedAttributes sequence.

ElementInternals class is empty-for-now.

See Also: → 1594265
Blocks: 1595050
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.
Upstream PR was closed without merging
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.
Regressions: 1595885
Upstream PR merged by moz-wptsync-bot
Regressions: 1596424

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.

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.

Blocks: 1723396

(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?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: