From: Olof-Joachim Frahm Date: Tue, 15 Oct 2013 20:41:14 +0000 (+0200) Subject: Use addEventListener instead. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fembed;p=jscl.git Use addEventListener instead. --- diff --git a/src/sequel.js b/src/sequel.js index ef429d4..f1c389c 100644 --- a/src/sequel.js +++ b/src/sequel.js @@ -1,13 +1,12 @@ /* execute all script tags with type of x-common-lisp */ -window.onload = (function () { +window.addEventListener('load', (function () { var scripts = document.scripts; for (var i = 0; i < scripts.length; ++i) { var script = scripts[i]; /* TODO: what about errors? */ - if (script.type == "text/x-common-lisp") { + if (script.type == "text/x-common-lisp") lisp.evalString(script.text); - } } -}); +}));