Merge pull request #10125 from benediktwerner/DOMContentLoaded
Use DOMContentLoaded instead of window.onloaddeepcrayonfish^2
commit
6efc6b4982
|
@ -149,7 +149,7 @@ object layout {
|
|||
|
||||
def lichessJsObject(nonce: Nonce)(implicit lang: Lang) =
|
||||
embedJsUnsafe(
|
||||
s"""lichess={load:new Promise(r=>{window.onload=r}),quantity:${lila.i18n
|
||||
s"""lichess={load:new Promise(r=>{document.addEventListener("DOMContentLoaded",r)}),quantity:${lila.i18n
|
||||
.JsQuantity(lang)}};$timeagoLocaleScript""",
|
||||
nonce
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
interface Lichess {
|
||||
load: Promise<void>; // window.onload promise
|
||||
load: Promise<void>; // document.onload promise
|
||||
info: any;
|
||||
requestIdleCallback(f: () => void, timeout?: number): void;
|
||||
sri: string;
|
||||
|
|
Loading…
Reference in New Issue