-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi folks, I thought I would give some heads up about something. document.registerElement (Custom Elements v0) is not supported by Electron 11, in favor of Custom Elements v1. Atom is looking to move to Electron 11 soonish: atom/atom#22687
More context, and documentation/references/resources (click to expand)
document.registerElement is part of Custom Elements v0. That is being slowly deprecated and removed from the web platform in favor of the consensus standard Custom Elements v1 [1].
It was finally removed from recent versions of Chromium/Chrome, and thus also recent versions of Electron.
(It was removed in Chromium/Chrome 86 [2], which then carries over to Electron 11 [3])
Atom has an open PR exploring the potential move to Electron 11 (atom/atom#22687 (comment)), but this means a breaking change dropping document.registerElement support from Atom. I thought I would post an issue here to let you folks know about it, since I understand this is used by some other important packages in the Atom ecosystem.
Here is a comment with some resources about Custom Elements v1:
atom/atom#22011 (comment)
Here are some example PRs showing how to migrate (coincidentally, most of these are from Atom core, but the code pattern applies to any recent JS environment):
Example PRs (click to expand)
- fix: use customElements atom-community/terminal#70
- Migrate styles element to custom elements atom/atom#22749
- Use custom element on pane container element atom/atom#22750
- Use custom element on pane-element atom/atom#22751
- Use custom element on workspace-element atom/atom#22755
- Use custom elements on TestPanelContainerItemElement atom/atom#22769
- Use customElement for the specs atom/atom#22774
- Use custom elements on pane container element atom/atom#22780
- Use customElement on pane axis atom/atom#22785
- Use custom element on pane resize-handle element atom/atom#22787
- Use custom elements on text editor element spec atom/atom#22789
- Use custom element on text editor element atom/atom#22867
Some specs might need some modification to attach things to the DOM? For example:
I'm not much of a JS expert myself, so I don't now how helpful those examples will be. but I see Custom Elements v0 is being used in this package at these locations in the code: