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.
This commit is contained in:
paweldomas 2017-03-07 16:29:50 -06:00
parent 9338b3cf94
commit 4fa800b87a
1 changed files with 5 additions and 0 deletions

View File

@ -113,6 +113,11 @@
window.setTimeout(
function () { window.location.replace(href); }, delay);
// Call extra handler if defined.
if (typeof postLoadErrorHandler === "function") {
postLoadErrorHandler();
}
};
window.removeEventListener(
'error', loadErrHandler, true /* capture phase */);