3
我試圖在Chrome擴展的注入內容腳本的畫布上下文中使用drawImage
。在Chrome擴展內容腳本中使用canvas drawImage
testCanvas = document.createElement('canvas');
testContext = testCanvas.getContext('2d');
var image = new Image();
testContext.drawImage(image, 0, 0);
在Chrome中26它工作正常,但在開發頻道(鉻28)本接縫打破,因爲我得到了這樣的信息:當我直接移動相同的腳本到後臺頁面
Uncaught TypeError: Type error
,它的工作原理沒有任何問題。
我認爲這可能與某些安全相關的更改有關,但我未能找到任何相關信息。
謝謝!錯誤報告https://code.google.com/p/chromium/issues/detail?id=238071 – Kepi 2013-05-04 20:49:22
@Kepi我在https://code.google.com/p/chromium/issues報告了一個新的錯誤/細節?ID = 245296。事實證明,該錯誤不是特定於「新Image()」,而是「Audio」和「Option」。 – 2013-05-30 15:31:57