index-website-static/assets/js/onload.js
Julie Blanc 08ebf7fc9e
All checks were successful
Deploy / Deploy to pre-production (push) Successful in 6s
script header visible
2025-12-23 17:29:27 +01:00

32 lines
751 B
JavaScript

import { headerToggle, headerScrollVisibility } from './header.js';
// TEMP, with includeHTML() --------------------------------------
window.onload = async function () {
await runIncludeHTML();
initAfterLoad();
};
function runIncludeHTML() {
if (typeof includeHTML === "function") {
const result = includeHTML();
if (result instanceof Promise) {
return result;
}
}
return Promise.resolve();
}
/// INIT --------------------------------------------------------
// Note: une fois que IncludeHTML() est supprimé, on peut supprimer tout le temp au dessus
// remplacer `function initAfterLoad()` par ↓
// window.onload = async function () {
function initAfterLoad() {
headerToggle();
headerScrollVisibility();
}