c# - Awesomium javascript error: SECURITY_ERR: DOM Exception 18 -


i executing javascript awesomium webcontrol

                  function getimage(img) {                         var canvas = document.createelement(\"canvas\");                         canvas.width = img.width;                         canvas.height = img.height;                         var ctx = canvas.getcontext(\"2d\");                         ctx.drawimage(img, 0,0);                         try{                               var imgdata=ctx.getimagedata(10,10,50,50);                               alert(imgdata);                         }catch(err){" +                               alert(err);" +                         }                   } 

now code giving alert :

error: security_err: dom exception 18

now common code javascript. told me if can set right flag can turned off. code should this:

webcore.initialize(new webconfig { additionaloptions = new[] { "--allow-file-access-from-files" } }); 

this "--allow-file-access-from-files" flag works chrome. know this. , suggestion or code sample highly appreciated.

thanks

i using version 1.6.6. use code :

        webcoreconfig config = new webcoreconfig();         config.disablesameoriginpolicy = true;         webcore.initialize(config, true); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -