问题描述
我遇到过这样一种情况,那就是知道给定节点是否已分发到content
节点中会很有帮助.有一个本机的Shadow DOM函数node.getDestinationInsertionPoints()对此非常有用,但是在polyfill世界中看不到该版本.
I've come across a situation where it would be helpful to know whether a given node has been distributed into a content
node. There's a native Shadow DOM function node.getDestinationInsertionPoints() that's very helpful for this purpose, but I don't see a version of this in the polyfill world.
我可以通过自己检查节点的父链来解决此问题,但是最好依靠标准(?)getDestinationInsertionPoints()函数. Shadow DOM polyfill是否(或将来)在较旧的浏览器中支持此功能?
I can work around the need for this by doing my own inspection of a node's parent chain, but it'd be nicer to rely on the standard (?) getDestinationInsertionPoints() function. Does -- or will -- the Shadow DOM polyfill support this in older browsers?
推荐答案
ShadowDOM polyfill现在应该支持getDestinationInsertionPoints()
的polyfilled版本.此特定更改应该在0.3.x中可用: https://github.com/polymer/polymer/releases
The ShadowDOM polyfill should now support a polyfilled version of getDestinationInsertionPoints()
. This particular change should be available in 0.3.x: https://github.com/polymer/polymer/releases
这篇关于getDestinationInsertionPoints是否存在polyfill?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!