开发者

Executing javascript from Silverlight out of browser app

开发者 https://www.devze.com 2023-01-28 13:43 出处:网络
I have a silverlight app that uses JavaScript to process images from facebook. The JavaScript calls context.drawImage which throws a security exception (NS_ERROR_DOM_SECURITY_ERR) which I understood h

I have a silverlight app that uses JavaScript to process images from facebook. The JavaScript calls context.drawImage which throws a security exception (NS_ERROR_DOM_SECURITY_ERR) which I understood happens since the image is not hosted by my server, but from a different server (in this case facebook).

After some research, I found that the correct permissions would be given to the app if run out of browser, but now I understood that I can't run the JavaScript since there is no browser to 开发者_JAVA技巧host it.

Is this correct? If so, can anyone suggest a workaround for running the JavaScript with the needed permissions to access a image hosted by a different server.

Thanks!


You are correct. JavaScript cannot run because there's no browser to host it.

The only solution is to rewrite the JavaScript.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号