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

Function waitForText

extensions/amp-render/1.0/test/test-amp-render.js:45–48  ·  view source on GitHub ↗
(el, txt)

Source from the content-addressed store, hash-verified

43 }
44
45 async function waitForText(el, txt) {
46 const hasText = () => el.querySelector('div').textContent === txt;
47 await waitFor(hasText, 'element text updated');
48 }
49
50 async function getRenderedData() {
51 const wrapper = await waitRendered();

Callers 1

test-amp-render.jsFile · 0.85

Calls 1

waitForFunction · 0.90

Tested by

no test coverage detected