javascript - Security Error in IE11 -


i have highchart(svg) trying covert image base64 format. in chrome working fine in ie11(throwing security error)

  highchartsexport.nativesvgtoimage($("#highchartcontainer").find("svg")[0],function(uri){                     var data = $.param({'dataurl': uri, 'emailcontent': $scope.content});                     var config = {headers: {'content-type': 'application/pdf;'}} 

in highchartsexport:

 exp.nativesvgtoimage = function(domobject,callback,format){             if(!domobject.nodename){                 throw new error("se requiere un objeto dom de tipo svg. obtener con document.getelementbyid o un selector de jquery $(contenedor).find('svg')[0]");             }              var svgdata = new xmlserializer().serializetostring(domobject);             var canvas = document.createelement("canvas");             canvas.width = $(domobject).width();             canvas.height = $(domobject).height();             var ctx = canvas.getcontext( "2d" );             var img = new image();//document.createelement("img");             img.setattribute( "src", "data:image/svg+xml;base64," + btoa(unescape(encodeuricomponent(svgdata))) );             img.onload = function() {                 ctx.drawimage( img, 0, 0 );                   if(format === "jpeg" || format === "jpg"){                      callback(canvas.todataurl("image/jpeg"));                  }else{                      callback(canvas.todataurl("image/png"));                  }             };              return true;         }; 

but throwing security error tried set cross-origin still same error


Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -