/** * @name whenDomReady * @namespace js.dom.when * @type Function * @platform js * @status stable * @async * * Wait that the dom is ready before resolving the promise * * @param {Function} [callback=null] A callback to call when ready * @return {Promise} A promise that will be resolved when the dom is ready * * @snippet __whenDomReady() * __whenDomReady().then(() => { * $1 * }); * * @todo tests * * @example js * import { __whenDomReady } from '@lotsof/sugar/dom' * __whenDomReady().then(() => { * // do something... * }); * * @see https://www.jstips.co/en/javascript/detect-document-ready-in-pure-js/ * @since 1.0.0 * @author Olivier Bossel (https://lotsof.dev) */ export default function __whenDomReady(): Promise;