Search code examples
polymerweb-componentcustom-element

How to remove or unregister a registered Custom Element?


I'm currently testing the performance of Custom Elements, so I stumpled upon the need to unregister a previously registered element. I couldn't find anything about that.

I think that could probably be needed, but before I have not researched this problem in more detail I'll not do any assumptions.

I know I could do it with refreshing the page, but that's not the point here.

What I've done so far to register an element the native, spec-like way:

document.registerElement('my-element', {
    prototype: Object.create(HTMLElement.prototype)
});

Solution

  • There is one or two discussions on google groups about unregistering elements but as far as I know no solution so far. https://groups.google.com/forum/#!topic/polymer-dev/31W69ZE1Wng