Skip to content

document.registerElement doesn't work in Electron 11, which is planned to be used in Atom soonish #90

@DeeDeeG

Description

@DeeDeeG

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)

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions