(event)
| 27 | }) |
| 28 | |
| 29 | const handleLoadAds = (event) => { |
| 30 | const { id } = event.detail |
| 31 | |
| 32 | if (window.innerWidth < 1024 && !id.includes('anchor')) { |
| 33 | return |
| 34 | } |
| 35 | |
| 36 | window.googletag.cmd.push(function () { |
| 37 | if (window.reactTooltipAds.initialized[id]) { |
| 38 | window.googletag.cmd.push(function () { |
| 39 | window.googletag.pubads().refresh() |
| 40 | }) |
| 41 | |
| 42 | window.googletag.display(id) |
| 43 | } else { |
| 44 | window.googletag.display(id) |
| 45 | window.reactTooltipAds.initialized[id] = true |
| 46 | } |
| 47 | }) |
| 48 | } |
| 49 | |
| 50 | window.addEventListener('AdsContainerMounted', handleLoadAds) |
nothing calls this directly
no outgoing calls
no test coverage detected