官术网_书友最值得收藏!

Shadow DOM

This part of the web components specification was the missing piece to create proper DOM encapsulation and composition. With shadow DOM, we can create isolated parts of the DOM that are protected against regular DOM operations from the outside. Also, CSS will not reach into shadow DOM automatically, and we can create local CSS within our component.

If you add a style tag inside shadow DOM, the styles are scoped to the root within the shadow DOM, and they will not leak outside. This enables a very strong encapsulation for CSS.

Content insertion points make it easy to control content from the outside of a shadow DOM component, and they provide some kind of an interface to pass in content.

At the time of writing this book, shadow DOM is supported by most browsers, although it still needs to be enabled in Firefox.

主站蜘蛛池模板: 房产| 营口市| 广德县| 上蔡县| 昌乐县| 神池县| 龙山县| 宝坻区| 康定县| 高密市| 金沙县| 临汾市| 崇明县| 托克托县| 射洪县| 德钦县| 丹东市| 扶沟县| 东明县| 平昌县| 仁怀市| 河北区| 历史| 民丰县| 平陆县| 崇文区| 枞阳县| 信丰县| 梁河县| 剑河县| 台中县| 峨眉山市| 内江市| 龙岩市| 利辛县| 晋城| 玛纳斯县| 乌鲁木齐县| 酉阳| 蓬安县| 大安市|