fixup e199e1b3
for non-e10s FF: moar timeouts!
This commit is contained in:
parent
9163a856f6
commit
1c1a9f2804
|
@ -37,6 +37,7 @@ globals:
|
|||
saveStyleSafe: false
|
||||
sessionStorageHash: false
|
||||
download: false
|
||||
doTimeout: false
|
||||
# localization.js
|
||||
template: false
|
||||
t: false
|
||||
|
|
|
@ -329,14 +329,16 @@ $('#file-all-styles').onclick = () => {
|
|||
tag: 'iframe',
|
||||
style: 'width: 0; height: 0; position: fixed; opacity: 0;'.replace(/;/g, '!important;'),
|
||||
}));
|
||||
setTimeout(() => {
|
||||
doTimeout().then(() => {
|
||||
link = iframe.contentDocument.importNode(link, true);
|
||||
iframe.contentDocument.body.appendChild(link);
|
||||
link.dispatchEvent(new MouseEvent('click'));
|
||||
setTimeout(() => {
|
||||
})
|
||||
.then(doTimeout)
|
||||
.then(() => link.dispatchEvent(new MouseEvent('click')))
|
||||
.then(doTimeout(1000))
|
||||
.then(() => {
|
||||
URL.revokeObjectURL(objectURL);
|
||||
iframe.remove();
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -359,3 +359,10 @@ function download(url) {
|
|||
xhr.send(query);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function doTimeout(ms = 0, ...args) {
|
||||
return ms > 0
|
||||
? () => new Promise(resolve => setTimeout(resolve, ms, ...args))
|
||||
: new Promise(resolve => setTimeout(resolve, 0, ...args));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user