dodge firefox race (thx exci)

This commit is contained in:
ed 2022-09-07 21:27:36 +02:00
parent 8fcb2d1554
commit 3a7b43c663

View file

@ -876,15 +876,19 @@ function scfg_bind(obj, oname, cname, defval, cb) {
function hist_push(url) { function hist_push(url) {
console.log("h-push " + url); console.log("h-push " + url);
if (window.history && history.pushState) try {
history.pushState(url, url, url); history.pushState(url, url, url);
} }
catch (ex) { }
}
function hist_replace(url) { function hist_replace(url) {
console.log("h-repl " + url); console.log("h-repl " + url);
if (window.history && history.replaceState) try {
history.replaceState(url, url, url); history.replaceState(url, url, url);
} }
catch (ex) { } // ff "The operation is insecure." on rapid switches
}
function sethash(hv) { function sethash(hv) {
if (window.history && history.replaceState) { if (window.history && history.replaceState) {