mirror of
https://gitee.com/shuto-github/Shadow-DOM-inject-styles.git
synced 2026-05-10 00:00:01 +08:00
init
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
function injectStyles(e,t,r){let l=e.shadowRoot,n=!1,o=Array.from(l.querySelectorAll("style"));o.forEach((e,c)=>{if(e.innerHTML==r&&(n=!0),o.length-1==c&&0==n){let e=document.createElement("style");e.innerHTML=r,l.insertBefore(e,l.querySelector(t))}})}export{injectStyles};
|
||||
Reference in New Issue
Block a user