When a custom element is not yet defined, it becomes an HTMLElement. When the custom element gets defined, the custom element is upgraded.
The current solution is to replace the element with the custom element and copy all of its properties, but according to spec the reference needs to be kept. We therefore need to change the prototype of the original HTMLElement to become the custom element.
When a custom element is not yet defined, it becomes an HTMLElement. When the custom element gets defined, the custom element is upgraded.
The current solution is to replace the element with the custom element and copy all of its properties, but according to spec the reference needs to be kept. We therefore need to change the prototype of the original HTMLElement to become the custom element.