问题
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.
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?
回答1:
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
来源:https://stackoverflow.com/questions/22949002/does-a-polyfill-exist-for-getdestinationinsertionpoints