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

Function callbackWithBackfill

ads/vendors/csa.js:250–257  ·  view source on GitHub ↗
(global, page, ad, containerName, hasAd)

Source from the content-addressed store, hash-verified

248 * @visibleForTesting
249 */
250export function callbackWithBackfill(global, page, ad, containerName, hasAd) {
251 if (hasAd) {
252 resizeIframe(global, containerName);
253 } else {
254 ad['adLoadedCallback'] = callbackWithNoBackfill.bind(null, global);
255 global['_googCsa']('ads', page, ad);
256 }
257}
258
259/**
260 * CSA callback function to resize the iframe when ads were returned

Callers 1

test-csa.jsFile · 0.90

Calls 1

resizeIframeFunction · 0.85

Tested by

no test coverage detected