(global, page, ad, containerName, hasAd)
| 248 | * @visibleForTesting |
| 249 | */ |
| 250 | export 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 |
no test coverage detected