How come alert breaks javascript execution? -


How is it possible that the alert function calls the behavior of the JS script? Something like this:

  function add_token (item) {var li_data = $ .data (item.get (0), "tokeninput");  

but it works:

  function add_token (item) {warning ('a'); Var li_data = $ .data (item.get (0), "tokeninput");  

Not - I get an error in firebug: li_data is undefined jquery.tokeninput.js Line 336 (adding the alert call is the only change)

(As You can see that I am playing with the full jQuery plugin -)

Now there is something that can bug me, can anyone explain to me how is this possible?

Update: I tried to use Chrome instead of Firefox, and this is not seeing a special problem now? Should it be considered a bug in FF or is there anything else about it, which I do not know?

Pure speculation, but the fact is that it is a complete thing for me to wonder If that is the fact that keeping in mind the alertness is to screw anything, is there a wrong event which is firing at the wrong time?


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -