- From: Joe Pea <notifications@github.com>
- Date: Fri, 29 Nov 2019 20:58:33 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 30 November 2019 04:58:36 UTC
Unfortunately, the following causes an error:
```js
class A extends HTMLElement {
constructor() {
super()
return new Proxy(this, {
get(target, key) {
console.log('get property:' key)
return target[key]
}
})
}
}
window.customElements.define('a-element', A)
```
```html
<a-element></a-element>
```
```
Uncaught DOMException: custom element constructors must call super() first and must not return a different object
```
Can Custom Elements API be upgraded to support Proxied instances?
--
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/857
Received on Saturday, 30 November 2019 04:58:36 UTC