Proper dynamic class definition using the prototype chain
danieldietrich opened this issue · comments
The current custom class definition works find (at least in Chrome and Safari). Do we additionally need to define the constructor explicitly?
CustomElement.prototype.constructor = CustomElement.prototype.constructor`
We should test all scenarios, including new()
, document.createElement('my-element')
and maybe even Reflect.construct()
.