HTMLElement (and descendants such as HTMLDivElement , HTMLSpanElement , etc.) are defined as interfaces in accordance with the MDN Documentation .
If I wanted to implement these interfaces using TypeScript, I can do the following.
class CustomElement implements HTMLElement {
}
However, the implementation of interfaces in TypeScript does not generate any code, so it is difficult to understand how to achieve the implementation of an interface using pure JavaScript.
How should these interfaces be implemented using pure JavaScript?
source
share