- `, {includeShadowRoots: true});
+ `);
var host = div.querySelector('#host');
assert_true(!!host.shadowRoot,"No shadow root found");
assert_true(host.shadowRoot.delegatesFocus,"delegatesFocus should be true");
- div.setInnerHTML(`
+ setInnerHTML(div,`
- `, {includeShadowRoots: true});
+ `);
host = div.querySelector('#host');
assert_true(!!host.shadowRoot,"No shadow root found");
assert_false(host.shadowRoot.delegatesFocus,"delegatesFocus should be false without the shadowrootdelegatesfocus attribute");
}, 'Declarative Shadow DOM: delegates focus attribute');
-
-test(() => {
- const host = document.createElement('div');
- // Root element of setInnerHTML is a :
- host.setInnerHTML('', {allowShadowRoot: true});
- assert_equals(host.shadowRoot, null, "Shadow root should not be present");
- const tmpl = host.querySelector('template');
- assert_true(!!tmpl,"Template should still be present");
- assert_equals(tmpl.getAttribute('shadowroot'),"open","'shadowroot' attribute should still be present");
-}, 'Declarative Shadow DOM: setInnerHTML root element');