我遇到过这样一种情况,了解给定节点是否已分发到 content
节点会很有帮助。有一个 native Shadow DOM 函数 node.getDestinationInsertionPoints() 对此非常有用,但我在 polyfill 世界中没有看到这个版本。
我可以通过自己检查节点的父链来解决这个问题,但依赖标准(?)getDestinationInsertionPoints() 函数会更好。 Shadow DOM polyfill 是否或将要在旧版浏览器中支持此功能?
最佳答案
ShadowDOM polyfill 现在应该支持 getDestinationInsertionPoints()
的 polyfill 版本。此特定更改应在 0.3.x 中可用:https://github.com/polymer/polymer/releases
关于polymer - getDestinationInsertionPoints 是否存在 polyfill?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22949002/