From 425d1504ac11d49586a144ff6e260d409e481cb0 Mon Sep 17 00:00:00 2001 From: g8up Date: Fri, 19 Oct 2018 01:49:12 +0800 Subject: [PATCH] change Element.createShadowRoot to Element.attachShadow #22 --- src/lookup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lookup.js b/src/lookup.js index e7bd50e..053e5e2 100644 --- a/src/lookup.js +++ b/src/lookup.js @@ -167,7 +167,7 @@ const getPanelCont = (html) => { addPanelEvent(panel); const tmpl = genTmpl(); - const root = panel.createShadowRoot(); + const root = panel.attachShadow({ mode: 'closed' }); root.appendChild(document.importNode(tmpl.content, true)); content = root.querySelector('#ydd-content'); }