MCPcopy Create free account
hub / github.com/ampproject/amphtml / waitForRender

Function waitForRender

extensions/amp-mathml/1.0/test/test-amp-mathml.js:90–98  ·  view source on GitHub ↗

* * @param {HTMLElement} element

(element)

Source from the content-addressed store, hash-verified

88 * @param {HTMLElement} element
89 */
90async function waitForRender(element) {
91 await element.buildInternal();
92 const loadPromise = element.layoutCallback();
93 await waitFor(
94 () => element.shadowRoot.querySelector('iframe'),
95 'iframe mounted'
96 );
97 await loadPromise;
98}

Callers 1

test-amp-mathml.jsFile · 0.70

Calls 3

waitForFunction · 0.90
buildInternalMethod · 0.80
layoutCallbackMethod · 0.45

Tested by

no test coverage detected