MCPcopy Index your code
hub / github.com/monkeytypegame/monkeytype / onDOMReady

Function onDOMReady

frontend/src/ts/utils/dom.ts:19–26  ·  view source on GitHub ↗
(callback: () => void)

Source from the content-addressed store, hash-verified

17 * If the document is already loaded, the callback is executed in the next event loop
18 */
19export function onDOMReady(callback: () => void): void {
20 bindReady();
21 if (isReady) {
22 setTimeout(callback);
23 } else {
24 readyList?.push(callback);
25 }
26}
27
28/**
29 * initialize the readyList and bind the necessary events

Callers 7

ready.tsFile · 0.90
solidPageFunction · 0.90
ad-controller.tsFile · 0.90
video-ad-popup.tsFile · 0.90
connection.tsFile · 0.90
dom.jsdom-spec.tsFile · 0.90

Calls 2

bindReadyFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected