Is it possible to create custom HTMLElement using class?
Whenever I'm creating unknown element, the constructor is unknown element (obviously).
document.createElement("hello");
// return value: <hello></hello>
// constructor: HTMLUnknownElement
Can i create my own HTMLElement using class?
class HTMLHelloElement extends HTMLElement {
//...
}
document.createElement("hello");
// return value: <hello></hello>
// constructor: HTMLHelloElement