Permalink
Browse files

use addEventListener instead of overriding window.onload

git-svn-id: http://httparchive.googlecode.com/svn/trunk@26 fc7d47d3-c008-acd5-f51f-d19787b8a02f
  • Loading branch information...
1 parent 8c2b2af commit 4cc1dbc21338e6e159f6d10a0e19cce4071ea2b6 stevesoudersorg committed Oct 20, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 sorttable-async.js
View
@@ -381,7 +381,13 @@ if (/WebKit/i.test(navigator.userAgent)) { // sniff
}
/* for other browsers */
-window.onload = sorttable.init;
+if (window.addEventListener) {
+ window.addEventListener('load', sorttable.init, false);
+}
+else if (window.attachEvent) {
+ window.attachEvent("onload", sorttable.init);
+}
+
// written by Dean Edwards, 2005
// with input from Tino Zijdel, Matthias Miller, Diego Perini

0 comments on commit 4cc1dbc

Please sign in to comment.