SVG tag doesn't work within polymer component in Firefox

后端 未结 3 1966
刺人心
刺人心 2021-01-16 11:23

Here is an example: http://miriti.ru/svgtest/ If you\'ll look at this example in any browser you will see two grey squares with green circles (labled \"Symbol\") inside. Exc

3条回答
  •  [愿得一人]
    2021-01-16 11:37

    I fixed it in Polymer 1.0 like this:

     attached: function () {
            //Fix "svg-use" in Firefox!! -> Properly bad for Performance (Issue: https://github.com/Polymer/polymer/issues/1182)
            this.async(function () {
                this.$.content.innerHTML = this.$.content.innerHTML;
            }, this);
        }
    

    but I don't use Bindings in my component (yet)

提交回复
热议问题