devarification complete, tests ok

This commit is contained in:
2020-04-02 22:31:04 +00:00
parent d9cf0dd106
commit 6212ff7ce8
8 changed files with 28 additions and 28 deletions

View File

@@ -48,7 +48,7 @@ import errorhandler from "./api/errorhandler";
// some say this is bad only due to if you want to server render the page
// (which is not necessary here anyway)
// however when I researched that I found it's easily worked around
// as all you need is a "window" global var defined and then it's all good in the hood
// as all you need is a "window" global let defined and then it's all good in the hood
// so for convenience and far less fuckery this is the way
//
@@ -100,24 +100,24 @@ Vue.config.productionTip = false;
// AJAX LOADER INDICATOR
//
// Store a copy of the fetch function
var _oldFetch = fetch;
let _oldFetch = fetch;
// Create our new version of the fetch function
window.fetch = function() {
// Create hooks
var fetchStart = new Event("fetchStart", {
let fetchStart = new Event("fetchStart", {
view: document,
bubbles: true,
cancelable: false
});
var fetchEnd = new Event("fetchEnd", {
let fetchEnd = new Event("fetchEnd", {
view: document,
bubbles: true,
cancelable: false
});
// Pass the supplied arguments to the real fetch function
var fetchCall = _oldFetch.apply(this, arguments);
let fetchCall = _oldFetch.apply(this, arguments);
// Trigger the fetchStart event
document.dispatchEvent(fetchStart);