The problem is that DOM defines the [`Element`
interface](https://dom.spec.whatwg.org/#element) without a [\[Constructor\]
extended attribute](https://heycam.github.io/webidl/#Constructor).
This means that `Element` can't be directly constructed. However, you can still
use something like
```js
class FooBar extends Element {
constructor() {
console.log("patched in Element");
let el = document.createElement('foo-bar');
return Object.setPrototypeOf(el, FooBar.prototype);
}
}
```
-Oriol
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss