-
Notifications
You must be signed in to change notification settings - Fork 391
Closed
Description
Given the variety of proposals for new custom element related methods that are starting to fly around (e.g. #419 and #427 talk about upgrade-related helpers, plus there's always our plans for a registry API #154), we should start considering changes to the top-level API shape, and decide on something ASAP.
I can imagine three possibilities:
document.customElements.define. Everything goes on that object.document.customElementsis null for documents without a browsing context.HTMLElement.define. This makes it a bit clearer things are tied to the browsing context instead of the document. Other things can go there too. Right now the only things on there are a bunch of Node SHOUTY_CONSTANTS.- Punt on the problem: stick with
document.defineElement, and just be sure to block future proposals on accepting one of the above two, at which pointdocument.defineElementbecomes an alias for one of those. This might not be feasible depending on how Custom elements disconnected from a document should not be upgraded #419 goes.
@annevk @rniwa @travisleithead thoughts?
Reactions are currently unavailable