The window.customElements
read-only property returns a reference to the CustomElementRegistry
object, which can be used to register custom elements, and get information about registered custom elements.
customElements = window.customElements
class BasicElement extends HTMLElement { connectedCallback() { this.textContent = 'Just a basic custom element.'; } } customElements.define('basic-element', BasicElement);
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'window.customElements' in that specification. | Living Standard | Initial definition. |
Feature | Firefox (Gecko) | Chrome | Edge | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
window.customElements | No support | (Yes) | No support | ? | ? | ? |
Feature | Firefox Mobile (Gecko) | Chrome for Android | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
window.customElements | ? | ? | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/window/customElements