Permalink
Browse files

had to change format of longer lines of code in README.md

  • Loading branch information...
1 parent e3798c6 commit fdfbccbe18ca97a5f97d0ba985091597ae249a01 @Integralist committed Mar 8, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 README.md
View
@@ -12,9 +12,7 @@ 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 fdfbccb

Please sign in to comment.