diff options
author | 2022-04-02 18:53:00 -0300 | |
---|---|---|
committer | 2022-04-02 18:53:00 -0300 | |
commit | a377ac1efc86afd1cb37c69248fa5adae0eb6e37 (patch) | |
tree | 8edb602e029c6d520fd684de6a36d87934842320 /packages/integrations/lit/client-shim.min.js | |
parent | e30aa4dfef2bbe874e2fe7f07232bf8a3c092317 (diff) | |
parent | a05177c50d52f09f32bcb2983e7af73f6507e235 (diff) | |
download | astro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.tar.gz astro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.tar.zst astro-a377ac1efc86afd1cb37c69248fa5adae0eb6e37.zip |
Merge branch 'main' into feat/vercel-adapter
Diffstat (limited to 'packages/integrations/lit/client-shim.min.js')
-rw-r--r-- | packages/integrations/lit/client-shim.min.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/packages/integrations/lit/client-shim.min.js b/packages/integrations/lit/client-shim.min.js index 0c6a452d8..f9fe14fdd 100644 --- a/packages/integrations/lit/client-shim.min.js +++ b/packages/integrations/lit/client-shim.min.js @@ -8,7 +8,8 @@ var b = (t, n) => { function s() { if (d === void 0) { let t = document.createElement('div'); - (t.innerHTML = '<div><template shadowroot="open"></template></div>'), (d = !!t.firstElementChild.shadowRoot); + (t.innerHTML = '<div><template shadowroot="open"></template></div>'), + (d = !!t.firstElementChild.shadowRoot); } return d; } @@ -18,7 +19,9 @@ var p, c, f, u = i(() => { - (p = (t) => t.parentElement === null), (c = (t) => t.tagName === 'TEMPLATE'), (f = (t) => t.nodeType === Node.ELEMENT_NODE); + (p = (t) => t.parentElement === null), + (c = (t) => t.tagName === 'TEMPLATE'), + (f = (t) => t.nodeType === Node.ELEMENT_NODE); }); var h, E = i(() => { @@ -52,7 +55,8 @@ var h, (e = r), o !== void 0 && o.parentElement.removeChild(o); break; } - let l = (n = e.parentElement) === null || n === void 0 ? void 0 : n.nextElementSibling; + let l = + (n = e.parentElement) === null || n === void 0 ? void 0 : n.nextElementSibling; if (l != null) { (e = l), o !== void 0 && o.parentElement.removeChild(o); break; @@ -75,5 +79,9 @@ async function g() { let { hydrateShadowRoots: t } = await Promise.resolve().then(() => (S(), v)); t(document.body); } -var x = new DOMParser().parseFromString('<p><template shadowroot="open"></template></p>', 'text/html', { includeShadowRoots: !0 }).querySelector('p'); +var x = new DOMParser() + .parseFromString('<p><template shadowroot="open"></template></p>', 'text/html', { + includeShadowRoots: !0, + }) + .querySelector('p'); (!x || !x.shadowRoot) && g(); |