function domReady(callback) {
        if (isPageLoaded) {
            callback(doc);
        } else {
            readyCalls.push(callback);
        }
        return domReady;
    }
Registers a callback for DOM ready. If DOM is already ready, the
callback is called immediately.
@param {Function} callback