Detect browser support for SVGFragmentIdentifier(s) - Javascript DOM

Javascript examples for DOM:Document implementation

Description

Detect browser support for SVGFragmentIdentifier(s)

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*  w w w.j a v a  2  s. c o  m*/
function supportsSvgView() {
    return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#View", "1.1");
}
if(supportsSvgView()) {
    console.log('suppoorted');
}
else {
    console.log('Not suppoorted');
}
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials