From blog:
Hello, sir! Hope you’re doing well today. :)
I’m finally working through the book, but I’ve hit a snag with main.js. The latest Chrome build is spitting this back out at me:
NOT_SUPPORTED_ERR: DOM Exception 9
for line 77 (which is the
var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);
line). Firefox gives me a similar error (“this operation is not supported” or something).
I looked around, and I found somebody else who received this error while using .getImageData(), but his problem was that he was passing two arguments instead of four, which isn’t the issue here. I’m pretty new to JavaScript, but were the CanvasWidth and CanvasHeight variables ever actually set? I know that we declared them in the first few lines of main.js, but were values ever placed into them? Would that be contributing to this error?
Thanks for this excellent book. I’ve already learned a lot, and I’m hoping that I can get this sorted out and learn more! :)
From blog:
Hello, sir! Hope you’re doing well today. :)
I’m finally working through the book, but I’ve hit a snag with main.js. The latest Chrome build is spitting this back out at me:
NOT_SUPPORTED_ERR: DOM Exception 9
for line 77 (which is the
var ImageData = BackContextHandle.getImageData(0, 0, CanvasWidth, CanvasHeight);
line). Firefox gives me a similar error (“this operation is not supported” or something).
I looked around, and I found somebody else who received this error while using .getImageData(), but his problem was that he was passing two arguments instead of four, which isn’t the issue here. I’m pretty new to JavaScript, but were the CanvasWidth and CanvasHeight variables ever actually set? I know that we declared them in the first few lines of main.js, but were values ever placed into them? Would that be contributing to this error?
Thanks for this excellent book. I’ve already learned a lot, and I’m hoping that I can get this sorted out and learn more! :)