I\'m trying to detect whether a custom element with a specific name was registered or not. Is there a way to make such check?
Or is there a way to get list of regist
There doesn't seem to a way to see all registered elements at the moment, but there is a way to check whether or not an element has been registered already: wrap the register in a try...catch block:
try {
document.registerElement('x-my-element');
} catch(e) {
console.log('already exists', e);
}
Run this twice in your console and you'll see the error logged.
This does have a drawback if you simply want to check whether or not it was registered though: if it was not, it will be after running this. There also isn't a way to unregister an element it seems.