Parcourir la source

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.
master
paweldomas il y a 8 ans
Parent
révision
4fa800b87a
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5
    0
      index.html

+ 5
- 0
index.html Voir le fichier

@@ -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 */);

Chargement…
Annuler
Enregistrer