- From: Caridy Patiño <notifications@github.com>
- Date: Tue, 25 Feb 2020 09:29:22 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 25 February 2020 17:29:35 UTC
caridy commented on this pull request. > +export class MyElement extends HTMLElement { + constructor() { + this.attachShadow({mode: 'open', registry}); + } +} +``` + +### Scoped element creation APIs + +Element creation APIs, like `createElement()` and `innerHTML` can be grouped into global API (those on Document or Window) and scoped APIs (those on HTMLElement and ShadowRoot). The scoped APIs have an associated Node that can be used to look up a CustomElementRegistry and thus a scoped definition. + +In order to support scoped registries we add new scoped APIs, that were previously only available on `Document`, to `ShadowRoot`: + +* `createElement()` +* `createElementNS()` +* `importNode()` what about `adoptNode`? -- 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/pull/865#pullrequestreview-364306203
Received on Tuesday, 25 February 2020 17:29:35 UTC