- From: Joe Pea <notifications@github.com>
- Date: Mon, 31 Aug 2020 14:30:53 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 31 August 2020 21:31:05 UTC
Seems you all want to prevent the following. But how?
```js
class SomeEl extends HTMLElement {
#internals = this.attachInternals()
}
customElements.define('some-el', SomeEl)
class ExposeInternalsextends extends SomeEl {
attachInternals() {
this.publicInternals = super.attachInternals()
this.shadow = this.publicInternals.shadowRoot // open or closed root, doesn't matter.
return this.publicInternals
}
}
// monkey-patched define method waited to overwrite the some-el definition.
customElements.define('some-el', ExposeInternals)
```
--
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/871#issuecomment-684051945
Received on Monday, 31 August 2020 21:31:05 UTC