javascript - Feature detection for the vector-effect property in SVG? -


svg tiny 1.2 defines property called vector-effect.

<path vector-effect="non-scaling-stroke" stroke-width="2"></path> 

with above path, stroke width 2 pixels, if element gets scaled (due transform on parent g element, example).

this property seems work in of svg-supporting browsers, but not in ie9 , ie10.

is there way feature-detect property?

this works me on firefox , ie 9.

  <script>     var elm = document.createelementns("http://www.w3.org/2000/svg", "g");     if (elm.style.vectoreffect != undefined) {       alert("supported");     } else {       alert("not supported");     }   </script> 

alternatively try modernizr. suppose.

modernizr.testprop('vectoreffect') 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -