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

Function styleLoaded

testing/iframe.js:311–320  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

309 // For this reason we poll until the style becomes available.
310 // Sync case.
311 const styleLoaded = () => {
312 const sheets = doc.styleSheets;
313 for (let i = 0; i < sheets.length; i++) {
314 const sheet = sheets[i];
315 if (sheet.ownerNode == style) {
316 return true;
317 }
318 }
319 return false;
320 };
321
322 if (styleLoaded()) {
323 cb();

Callers 1

installStylesLegacyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected