Ensure DOM is loaded before binding the global AJAX error handler.
This commit is contained in:
parent
e7b4aeedab
commit
88028d5770
1 changed files with 4 additions and 2 deletions
|
@ -25,9 +25,11 @@ window.GeneralFunctions = window.GeneralFunctions || {};
|
||||||
/**
|
/**
|
||||||
* Register global error handler.
|
* Register global error handler.
|
||||||
*/
|
*/
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
$(document).ajaxError(function (event, jqxhr, settings, thrownError) {
|
$(document).ajaxError(function (event, jqxhr, settings, thrownError) {
|
||||||
GeneralFunctions.ajaxFailureHandler(jqxhr, settings, thrownError);
|
GeneralFunctions.ajaxFailureHandler(jqxhr, settings, thrownError);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This functions displays a message box in the admin array. It is useful when user
|
* This functions displays a message box in the admin array. It is useful when user
|
||||||
|
|
Loading…
Reference in a new issue