我听说过影子DOM似乎解决了Web部件开发中的封装问题。DOM和CSS规则被封装,这对于维护是有好处的。但是这不是iframe是什么?iframe有什么问题使W3C需要使用ShadowDOM或HTML5WebComponents?解决方法iframe仅用作封装对象…withtheexceptionofSVG,today’sWebplatformoffersonlyonebuilt-inmechanismtoisolateonechunkofcodefromanother—anditain’tpretty.