- From: Baocang Nie <notifications@github.com>
- Date: Sat, 07 Oct 2017 13:28:54 +0000 (UTC)
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 7 October 2017 13:29:17 UTC
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