diff -r 26b7c4aa7b38 -r cdd2a032b424 svghmi/gen_index_xhtml.xslt --- a/svghmi/gen_index_xhtml.xslt Wed Mar 17 11:07:29 2021 +0100 +++ b/svghmi/gen_index_xhtml.xslt Thu Mar 18 14:32:21 2021 +0100 @@ -4607,49 +4607,55 @@ this.abort_controller = new AbortController(); - const query = { - - args: this.args, - - range: this.cache[1], - - position: this.cache[2], - - visible: this.visible, - - extra: this.cache.slice(4), - - options: opt - - }; - - - - const options = { - - method: 'POST', - - body: JSON.stringify(query), - - headers: {'Content-Type': 'application/json'}, - - signal: this.abort_controller.signal - - }; - - - - return fetch(this.args[0], options) - - .then(this.handle_http_response_bound) - - .then(this.spread_json_data_bound) - - .catch(this.fetch_error_bound); - - - - } + return Promise.resolve().then(() => { + + + + const query = { + + args: this.args, + + range: this.cache[1], + + position: this.cache[2], + + visible: this.visible, + + extra: this.cache.slice(4), + + options: opt + + }; + + + + const options = { + + method: 'POST', + + body: JSON.stringify(query), + + headers: {'Content-Type': 'application/json'}, + + signal: this.abort_controller.signal + + }; + + + + return fetch(this.args[0], options) + + .then(this.handle_http_response_bound) + + .then(this.spread_json_data_bound) + + .catch(this.fetch_error_bound); + + }); + + } + + unsub(){