Gisellameloni / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

svg to work without a plugin #1234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi, i would like to ask what are the changes i gotta make so that i run my svg 
code in the browser without a plugin ,as the recent web browsers support svg ,

function checkForSvgPlugin() {

  var svgPluginEnabled = false;
  // navigator.mimeTypes - IE 4 and later for Windows returns an array of zero length - O'REILLY JavaScipt Reference
  if(((navigator.mimeTypes["image/svg"]) && (navigator.mimeTypes["image/svg"].enabledPlugin != null)) ||
     ((navigator.mimeTypes["image/svg+xml"]) && (navigator.mimeTypes["image/svg+xml"].enabledPlugin != null)) ||
     ((navigator.mimeTypes["image/svg-xml"]) && (navigator.mimeTypes["image/svg-xml"].enabledPlugin != null))) {
    svgPluginEnabled = true;
  } else {
    if(window.ActiveXObject) {
      try {
        svgObj = new ActiveXObject("Adobe.SVGCtl");
        svgObj = null;
        svgPluginEnabled = true;
      } catch(e) {
        svgPluginEnabled = false;
      }
    }
  }
  return svgPluginEnabled;
}
will my code work if i remove the whole method?suggest me how can i do it

Original issue reported on code.google.com by kushi.dh...@gmail.com on 5 Aug 2014 at 3:40

GoogleCodeExporter commented 9 years ago
As a brief answer, I'll suggest that you should not need that method if you are 
only supporting modern browsers. As this question is not related to SVG-Edit, I 
am closing this issue. For general SVG questions, please post instead under 
http://stackoverflow.com/tags/svg .

Original comment by bret...@gmail.com on 25 Sep 2014 at 6:19