File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JS function with 'defer'...

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly the 'defer' is?

I have heard two things about it:

1. The JS function with 'defer' is called at the end, after completion of the whole document (page).

2. Browser doesn't wait for completion of JS function with 'defer'. It continues the execution of rest of the things. Not clear, how it happens? (threading???)

Please clear my doubt.

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure why anyone would use it, but scroll to the bottom of this ro read the whole thing:

http://www.quirksmode.org/js/placejs.html

Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic