Browse files

had to change format of longer lines of code in

  • Loading branch information...
Integralist committed Mar 8, 2011
1 parent 8f5d8ea commit e3798c65bea81148fa15ae44657029d3713ac4d6
Showing with 3 additions and 3 deletions.
  1. +3 −3
@@ -12,9 +12,9 @@ If you try and call a function which modifies an element in the DOM, but yet you
So to avoid this, developers would write code that looked like this...
-`window.onload = function() {'
-' // do something here'
+`window.onload = function() {`
+` // do something here`
...but the problem was that this is too slow for most developers. You want to be interacting with your DOM as soon as possible, but if you use the `window.onload` event then you're not just waiting for the DOM but all its content (such as images, stylesheets, iframes etc) to load as well.

0 comments on commit e3798c6

Please sign in to comment.