MCPcopy Create free account
hub / github.com/UI5/webcomponents / whenDOMReady

Function whenDOMReady

packages/base/src/util/whenDOMReady.ts:1–11  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1const whenDOMReady = () => {
2 return new Promise<void>(resolve => {
3 if (document.body) {
4 resolve();
5 } else {
6 document.addEventListener("DOMContentLoaded", () => {
7 resolve();
8 });
9 }
10 });
11};
12
13export default whenDOMReady;

Callers 1

bootExecutorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…