The HTMLPreElement type in JavaScript produces a DOM element corresponding to the <pre> tag. Where is the type corresponding to <code>? It seems there should be an HTMLCodeElement type, but there isn't. How do I go about instantiating this in NodeJS JavaScript?
const c0d3 = document.createElement("code");
Object.getPrototypeOf(c0d3).constructor.toString();
//function(){return a.Reflect.construct(a.HTMLElement,[],this.constructor)}
At least on the browser side (Chrome, on node side you possibly have other workarounds to create mock DOM elements), it is not directly a distinct constructor, but rather a wrapper function that makes use of HTMLElement itself and another function this.constructor that is passed as an argument to Reflect.construct.
The old way of creating these native constructors are generally something like:
//Instances inherit from parent proto
HTMLSomeChildElementFunc.prototype = Object.create(HTMLSomeParentElementFunc.prototype);
//Statics are inherited on the constructor
Object.setPrototypeOf(HTMLSomeCHildElement, HTMLSomeParentElement);
In this case it is a bit different, they went for some sort of monkey patch.