Feat: Web loader
This commit is contained in:
13
Loader/scripts/handoff.js
Normal file
13
Loader/scripts/handoff.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Path: Loader/scripts/handoff.js
|
||||
|
||||
import { LOADER_HANDOFF_DELAY_MS } from "./config.js";
|
||||
|
||||
export const scheduleHandoff = (target, onBeforeHandoff) => {
|
||||
window.setTimeout(() => {
|
||||
if (typeof onBeforeHandoff === "function") {
|
||||
onBeforeHandoff();
|
||||
}
|
||||
|
||||
window.location.assign(target);
|
||||
}, LOADER_HANDOFF_DELAY_MS);
|
||||
};
|
||||
Reference in New Issue
Block a user