Does a polyfill exist for getDestinationInsertionPoints?

喜夏-厌秋 提交于 2019-12-21 21:25:06

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!