mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Overlay should load not for DOMContentLoaded event only if document has already complete loading.
This commit is contained in:
parent
f3612e73cf
commit
ec314953bb
@ -833,7 +833,7 @@ export class SpineWebComponentWidget extends HTMLElement implements Disposable,
|
|||||||
this.initAfterConnect();
|
this.initAfterConnect();
|
||||||
} else {
|
} else {
|
||||||
window.addEventListener("DOMContentLoaded", this.DOMContentLoadedHandler);
|
window.addEventListener("DOMContentLoaded", this.DOMContentLoadedHandler);
|
||||||
if (document.readyState !== "loading") {
|
if (document.readyState === "complete") {
|
||||||
this.DOMContentLoadedHandler();
|
this.DOMContentLoadedHandler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user