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:
parent
9338b3cf94
commit
4fa800b87a
|
@ -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 */);
|
||||
|
|
Loading…
Reference in New Issue