From 4fa800b87a86f4a0d6d34dd195594e560b0175f5 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Tue, 7 Mar 2017 16:29:50 -0600 Subject: [PATCH] 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. --- index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html b/index.html index d8453ed839..e6a5839fd5 100644 --- a/index.html +++ b/index.html @@ -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 */);