开发者

Opera weird behavior, showing many alert boxes

I am using html5 to do this basic function of pasting the same image in a canvas. It seems to work fine in Chrome and FF but when I open it in Opera, w开发者_StackOverflow社区ith help of localhost it goes crazy with pop up (alert like)

Opera weird behavior, showing many alert boxes

Now it goes on like 186, 372, 558, 744, 930, 116, etc. it doesn't stop!

Can anyone figure out what's wrong? There is my code

imageObj.src = "Crystal-outline.gif";

var start=0; var total=150;
i=start;
for (var x=0; x <= 870;x += 30 ) {
  for (var y=0; y <= 120;y += 30 ) {
  my[i]=imageObj;
context.drawImage(my[i], x, y);
i++; 
}} 

Image is 30x30 pixel.


This is weird, but try disabling user scripts, extensions and possibly even browser.js to figure out if any of those cause the alert()s. If you're using some JS library or code you haven't written, check the entire source code for calls to the alert() method. Or..try to add this to your code:

window.alert=function(){ try{undefined();}catch(e){opera.postError(e.stack);} }

which should show in the error console the entire call stack of the alert() call.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜