Webサーバも立てずに、file:///〜
で直にhtmlファイルをブラウザ で表示してCanvasの処理を書いていたら、クロスドメインなんちゃらとエラーが出た。謎だ。
[code] hoge.html:17 Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data. at init (file:///Users/〜〜/hoge.html:17:15) at onload (file:///Users/〜〜/hoge.html:38:23) [/code]
ローカル環境でWebサーバを立ち上げて、Webサーバ経由でhtmlにアクセスするようにしたら、警告が出なくなった。