You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shadow DOM is the new w3c standard about web technology.
To show how does @import not work, see the example:
index.html
<body><styletype="text/css">
@import "test1.css"; /* this will reload when change test1.css and is expected */
</style><divid="d1">I will reload</div><divid="wrap"><templateid="tmp"><styletype="text/css">
@import "test2.css"; /* this will not reload when change test2.css and is not expected */
</style><divid="d2">I will not reload</div></template></div><scripttype="text/javascript">varwrap=document.getElementById('wrap')varshadow=wrap.createShadowRoot()vartemplate=document.getElementById('tmp')varclone=document.importNode(template.content,true)shadow.appendChild(clone)</script><script>document.write('<script src="http://'+(location.host||'localhost').split(':')[0]+':35729/livereload.js?snipver=1"></'+'script>')</script></body>
test1.css
#d1 { background: red; }
test2.css
#d2 { background: yellow; }
Please only test in chrome, I don't know if any other browser support the ShadowRoot interface
I think the reason is really simple, it did not take wrap.shadowRoot into consideration
The text was updated successfully, but these errors were encountered:
Shadow DOM is the new w3c standard about web technology.
To show how does
@import
not work, see the example:index.html
test1.css
test2.css
I think the reason is really simple, it did not take
wrap.shadowRoot
into considerationThe text was updated successfully, but these errors were encountered: