Element.shadowRoot in firefox

笑着哭i 提交于 2019-12-24 20:41:07

问题


How can we workaround Element.shadowRoot in Firefox since it is not available yet ?

About Element.shadowRoot https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot


回答1:


You need to load the polyfills. But the shadowDOM Polyfill comes with some limitations.

Personally I don't use shadowDOM yet unless I know I am going Chrome only.

I am waiting for all of the major browsers to support it in their current version and previous version before I start using it all the time. That is probably a year to 18 months out.

Here is info on the polyfills: https://www.webcomponents.org/polyfills



来源:https://stackoverflow.com/questions/50028945/element-shadowroot-in-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!