summaryrefslogtreecommitdiff
path: root/packages/integrations/lit
diff options
context:
space:
mode:
Diffstat (limited to 'packages/integrations/lit')
-rw-r--r--packages/integrations/lit/client-shim.js2
-rw-r--r--packages/integrations/lit/client-shim.min.js4
-rw-r--r--packages/integrations/lit/server.js2
-rw-r--r--packages/integrations/lit/test/server.test.js2
4 files changed, 5 insertions, 5 deletions
diff --git a/packages/integrations/lit/client-shim.js b/packages/integrations/lit/client-shim.js
index ca97b92cc..c457710b7 100644
--- a/packages/integrations/lit/client-shim.js
+++ b/packages/integrations/lit/client-shim.js
@@ -8,7 +8,7 @@ async function polyfill() {
}
const polyfillCheckEl = new DOMParser()
- .parseFromString(`<p><template shadowroot="open"></template></p>`, 'text/html', {
+ .parseFromString(`<p><template shadowroot="open" shadowrootmode="open"></template></p>`, 'text/html', {
includeShadowRoots: true,
})
.querySelector('p');
diff --git a/packages/integrations/lit/client-shim.min.js b/packages/integrations/lit/client-shim.min.js
index afae053ac..0965e6a78 100644
--- a/packages/integrations/lit/client-shim.min.js
+++ b/packages/integrations/lit/client-shim.min.js
@@ -8,7 +8,7 @@ var b = (t, n) => {
function s() {
if (d === void 0) {
let t = document.createElement('div');
- (t.innerHTML = '<div><template shadowroot="open"></template></div>'),
+ (t.innerHTML = '<div><template shadowroot="open" shadowrootmode="open"></template></div>'),
(d = !!t.firstElementChild.shadowRoot);
}
return d;
@@ -80,7 +80,7 @@ async function g() {
window.addEventListener('DOMContentLoaded', () => t(document.body), { once: true });
}
var x = new DOMParser()
- .parseFromString('<p><template shadowroot="open"></template></p>', 'text/html', {
+ .parseFromString('<p><template shadowroot="open" shadowrootmode="open"></template></p>', 'text/html', {
includeShadowRoots: !0,
})
.querySelector('p');
diff --git a/packages/integrations/lit/server.js b/packages/integrations/lit/server.js
index 48a3c646f..da571466f 100644
--- a/packages/integrations/lit/server.js
+++ b/packages/integrations/lit/server.js
@@ -62,7 +62,7 @@ function* render(Component, attrs, slots) {
yield `>`;
const shadowContents = instance.renderShadow({});
if (shadowContents !== undefined) {
- yield '<template shadowroot="open">';
+ yield '<template shadowroot="open" shadowrootmode="open">';
yield* shadowContents;
yield '</template>';
}
diff --git a/packages/integrations/lit/test/server.test.js b/packages/integrations/lit/test/server.test.js
index e7b5e98f9..439c0877d 100644
--- a/packages/integrations/lit/test/server.test.js
+++ b/packages/integrations/lit/test/server.test.js
@@ -38,7 +38,7 @@ describe('renderToStaticMarkup', () => {
customElements.define(tagName, class extends LitElement {});
const render = await renderToStaticMarkup(tagName);
expect(render).to.deep.equal({
- html: `<${tagName}><template shadowroot="open"><!--lit-part--><!--/lit-part--></template></${tagName}>`,
+ html: `<${tagName}><template shadowroot="open" shadowrootmode="open"><!--lit-part--><!--/lit-part--></template></${tagName}>`,
});
});