X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=blobdiff_plain;f=app%2Fauthsystem.js;h=92e3772ad13bdc6723026c21eae000621c616915;hp=1e5c1b0fbe60d48922c5c79c6231c95385905174;hb=c80595d16281ccdfb16bd370e165bb86e759e96c;hpb=9cab985cf8d73f719cd7efc2838ce2e107b45b21 diff --git a/app/authsystem.js b/app/authsystem.js index 1e5c1b0..92e3772 100644 --- a/app/authsystem.js +++ b/app/authsystem.js @@ -2,7 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -window.onload = function() { +// Call initElements at the earliest possible stage after parsing the document. +if (window.addEventListener) { window.addEventListener("DOMContentLoaded", initElements, false); } +else { window.onload = initElements; } + +function initElements() { var jsWarning = document.getElementById("jswarning"); if (jsWarning) { if (jsWarning.classList) {