SVG tag doesn't work within polymer component in Firefox

后端 未结 3 1975
刺人心
刺人心 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:34

    I seem to find a workaround for your problem. First of all, wrap your element with

    . This is necessary, because later we will reinitialize the inner content of this div.

    
    

    Then in the script section do the following woodoo-magic:

      domReady: function() {
        this.async(function() { 
          this.injectBoundHTML(this.$.content.innerHTML, this.$.content); 
        }, this);
      }
    

    Please don’t complain about the weirdness of this trick :)

    You are done: FF is satisfied now.

提交回复
热议问题