MCPcopy
hub / github.com/ampproject/amphtml / whenDocumentReady

Function whenDocumentReady

src/core/document/ready.js:63–67  ·  view source on GitHub ↗
(doc)

Source from the content-addressed store, hash-verified

61 * @return {Promise<Document>}
62 */
63export function whenDocumentReady(doc) {
64 return new Promise((resolve) => {
65 onDocumentReady(doc, resolve);
66 });
67}
68
69/**
70 * Returns a promise that is resolved when document is complete.

Callers 6

test-ready.jsFile · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls 1

onDocumentReadyFunction · 0.70

Tested by

no test coverage detected