summaryrefslogtreecommitdiff
path: root/packages/renderers/renderer-lit/client-shim.js
blob: 8dd75826ff66e59fc1c4e495e53ba09d9d1467f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
async function polyfill() {
  const { hydrateShadowRoots } = await import('@webcomponents/template-shadowroot/template-shadowroot.js');
  hydrateShadowRoots(document.body);
}

if(!(new DOMParser().parseFromString(`<p><template shadowroot="open"></template></p>`, 'text/html', {
  includeShadowRoots: true
}).querySelector('p')?.shadowRoot))
  polyfill();