/** * @param {Function} callback */ export const ready = (callback) => { if (document.readyState !== 'loading') { callback(); } else { document.addEventListener('DOMContentLoaded', callback); } };