UNPKG

atomico

Version:

Atomico is a small library for the creation of interfaces based on web-components, only using functions and hooks.

13 lines (11 loc) 332 B
import { options } from "./options.js"; import { addListener } from "./utils.js"; export const DOMLoaded = new Promise((resolve) => { if (!options.ssr) { if (document.readyState === "loading") { addListener(document, "DOMContentLoaded", resolve); } else { resolve(); } } });