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

Can I double-check an expected behavior?

```
// Construct a dom tree interactively
const p = document.createElement('div');
const s = document.createElement('shadowroot');
p.appendChild(s);
assert(p.hasChildNodes());
assert(!p.shadowRoot);

// Then, we *serialize* and *deserialize* |p|.
const inner_html = p.innerHTML();
assert(inner_html === '<shadowroot></shadowroot>';
p.innerHTML = inner_html;

// Now, |p| changed.
assert(!p.hasChildNodes());
assert(p.shadowRoot);  // Assuming shadow root's mode is "open" here.
```

Can I assume that this is an acceptable behavior?


-- 
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-331323635

Received on Friday, 22 September 2017 01:16:14 UTC