We’re building a multitrack timeline web component. It has quite a few internal components, and I don’t want to register them as custom elements.
Fun workaround? Extend <div> 😛
class RulerElement extends DivElement {
/* ruler stuff */
}
yolo.append(new RulerElement())
ALT The following JavaScript:
function DivElement() {
return Object.setPrototypeOf(
document.createElement('div'),
new.target.prototype
)
}
DivElement.prototype = HTMLElement.prototype