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

Function flushableRender

testing/preact.js:39–45  ·  view source on GitHub ↗

* @param {() => void} process * @return {Promise }

(process)

Source from the content-addressed store, hash-verified

37 * @return {Promise<void>}
38 */
39async function flushableRender(process) {
40 pendingRender = () => {
41 pendingRender = null;
42 return process();
43 };
44 await Promise.resolve().then(pendingRender);
45}
46
47/**
48 * Flushes Preact renders and effects.

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
thenMethod · 0.45

Tested by

no test coverage detected