Jump to content

Why does my page look ugly in IE but okey in rest of browsers?


rain13

Recommended Posts

Wrong. Yes it is singlethreaded but wonce you click ok the code execution continues.

 

Ah, yes- just a clarification: in italics:)

 

The reason your code sample doesn't reach the second alert is because alert() is blocking the other elements from javascript manipulation in the other browsers. Javascript is singlethreaded. Alert() stops javascript in its tracks, and will not resume with interacting with DOM elements until you close the alert box. It just may be that FF is doing a little more than the other browsers the microseconds before firing the alert() function. Replace alert() with console.log() and compare the difference.

Link to comment
Share on other sites

Thanks for that clarification. That italic text also highlighted the idea console.log() which I missed before for some reason. Actually I didn't know about that possibility. :)

Edited by SoItBegins
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...