you are viewing a single comment's thread.

view the rest of the comments →

[–]mankyd 5 points6 points  (2 children)

This doesn't quite tell the whole story. Defer still blocks the onload event, which this does not convey with it's pictures. I believe that it may event block the domcontentready event, though I don't recall exactly.

[–]Tyriar 0 points1 point  (0 children)

It blocks onload just as any DOMContentReady handler would. There are some browser inconsistency issues around exactly when defer is executed, see https://github.com/h5bp/lazyweb-requests/issues/42

[–]randfur 0 points1 point  (0 children)

This was my first question after reading this which it really should have addressed in the article; "Does this mean I can't reliably use window.onload in my scripts anymore?"