Skip to content

Instantly share code, notes, and snippets.

@bdelacretaz
Last active October 10, 2023 14:32
Show Gist options
  • Save bdelacretaz/68ec08b099248542ba7a970b5f1d8ede to your computer and use it in GitHub Desktop.
Save bdelacretaz/68ec08b099248542ba7a970b5f1d8ede to your computer and use it in GitHub Desktop.
// List custom element names registered in the current browser page
console.log(
[...new Set([].map.call(
document.querySelectorAll('*'),
el => el.nodeName.toLowerCase()))
].filter(
customElements.get.bind(customElements)
)
.sort()
)
@bdelacretaz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment