Bläddra i källkod

feat(index.html): post load error handler

Adds a placeholder which allows to write a plugin for executing some
code after the "load error handler" is triggered. A function named
"postLoadErrorHandler" should be defined in one of
the "#include virtual" files.
j8
paweldomas 8 år sedan
förälder
incheckning
4fa800b87a
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5
    0
      index.html

+ 5
- 0
index.html Visa fil

@@ -113,6 +113,11 @@
113 113
 
114 114
                     window.setTimeout(
115 115
                         function () { window.location.replace(href); }, delay);
116
+
117
+                    // Call extra handler if defined.
118
+                    if (typeof postLoadErrorHandler === "function") {
119
+                        postLoadErrorHandler();
120
+                    }
116 121
                 };
117 122
                 window.removeEventListener(
118 123
                     'error', loadErrHandler, true /* capture phase */);

Laddar…
Avbryt
Spara