export function initModernizr() {
    return new Promise((resolve) => {
        const script = document.createElement('script');
        script.src = '/src/assets/js/modernizr.2.5.3.min.js';
        script.onload = () => {
            let retries = 0;
            const check = () => {
                if (window.Modernizr || retries > 10) {
                    resolve();
                } else {
                    retries++;
                    setTimeout(check, 100);
                }
            };
            check();
        };
        document.head.appendChild(script);
    });
}