- From: Ryosuke Niwa <notifications@github.com>
- Date: Sat, 15 Oct 2016 16:39:56 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Saturday, 15 October 2016 23:40:23 UTC
FWIW, you can use `Reflect.construct` to call `HTMLElement`'s constructor. e.g.
```js
function CustomElement() {
return Reflect.construct(HTMLElement, [], CustomElement);
}
Object.setPrototypeOf(CustomElement.prototype, HTMLElement.prototype);
Object.setPrototypeOf(CustomElement, HTMLElement);
customElements.define('custom-element', CustomElement);
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/587#issuecomment-254017839
Received on Saturday, 15 October 2016 23:40:23 UTC