HTML5 Canvas & Same-Origin
I am loading the page into QWebView like so,
The content includes something like,
I then try to do this in JS:
@var canvas = document.querySelector("canvas");
var cxt = canvas.getContext("2d");
var image = document.querySelector("image");
cxt.drawImage(image, 0, 0);
var imgData = cxt.getImageData(1, 1, 1, 1);@
This doesn't work, apparently due to a SameOrigin error because if I just add,
then it works fine, except I don't want to do this since it's a general security concern...
But since the page is loaded with base "file://" and the file is being loaded from "file://" ... how is this a SameOrigin conflict!?
Can anybody explain what I'm missing?
(I'm using Qt 4.8.4.)