VOOZH about

URL: https://www.geeksforgeeks.org/javascript/html-dom-window-customelements-property/

⇱ HTML DOM window customElements property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM window customElements property

Last Updated : 1 Jun, 2022

The customElements property returns a reference to a CustomElementRegistry object, which can be further used to register new custom elements and hence get information about previously registered custom elements.

Syntax:

var obj = window.customElements;

Return Value:

  • CustomElementRegistry Object: This property returns an object which contains details about Custom Elements defined.

Example: In this example, we will get information about custom elements and will create a custom element using define() method.

Output:

Before Button Click:

👁 Image

After Button Click:

👁 Image

customElements object:

👁 Image

Supported Browsers:

  • Google Chrome 54 and above
  • Edge 79 and above
  • Firefox 63 and above
  • Safari 10.1 and above
  • Opera 41 and above
  • Internet Explorer not supported
Comment
Article Tags:
Article Tags: