Polymer (1.0) - dynamic use xlink:href$ inside template not working properly

假装没事ソ 提交于 2019-12-02 03:17:41

A workaround is to add the attribute statically in addition to the binding

 <use xlink:href="" xlink:href$="[[replaceSVGPath(item)]]"></use>

Polymer has issues creating the attribute, if it already exists it can update it just fine.

This is an issue with Polymer. SVG uses namespaced attributes. To set them properly, you need to call setAttributeNS, but Polymer's attribute bindings aren't namespace-aware, so they can't set these attributes.

This is filed as issue #3060.

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