Re: [w3c/webcomponents] Non-class based example of customElement.define() (#587)

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