Re: [whatwg/dom] Declarative Shadow DOM (#510)

shadow: none|open|closed, default is none
```html
<template shadow="open"></template>
<element shadow="open">
    <template></template>
</element>
```
```javascript
customElements.define('custom-element', class extends HTMLElement{}, {
    shadow: 'open'
});
// or
customElements.define('custom-element', class extends HTMLElement {
    static get shadow() { return 'open'; }
});
```

```html
<the-element>
    <shadow mode="open">
        <h1>Shadow Contents</h1>
        <slot></slot>
    </shadow>
    <h1>Contents</h1>
</the-element>
<!--parsed as-->
<the-element>
    #shadowroot (open)
        <h1>Shadow Contents</h1>
        <slot></slot>
    <h1>Contents</h1>
</the-element>
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/510#issuecomment-334935121

Received on Saturday, 7 October 2017 13:29:17 UTC