@reuters-graphics/graphics-components 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,6 +45,20 @@ export const loadBootstrap = () => {
|
|
|
45
45
|
// @ts-ignore window global
|
|
46
46
|
window.googletag.pubads().enableAsyncRendering();
|
|
47
47
|
window.googletag.pubads().collapseEmptyDivs(true);
|
|
48
|
+
window.googletag
|
|
49
|
+
.pubads()
|
|
50
|
+
.addEventListener('slotRenderEnded', function (event) {
|
|
51
|
+
const adDiv = document.getElementById(event.slot.getSlotElementId());
|
|
52
|
+
if (!adDiv)
|
|
53
|
+
return;
|
|
54
|
+
// If the ad slot is empty
|
|
55
|
+
if (event.isEmpty) {
|
|
56
|
+
adDiv.classList.add('unfulfilled-ad');
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
adDiv.classList.remove('unfulfilled-ad');
|
|
60
|
+
}
|
|
61
|
+
});
|
|
48
62
|
});
|
|
49
63
|
// Set page-level key-values
|
|
50
64
|
// cf: https://help.freestar.com/help/using-key-values
|
|
@@ -18,6 +18,6 @@ Import the SCSS directly in your top-level component. (This is done for you in t
|
|
|
18
18
|
<script>
|
|
19
19
|
// other imports and stuffs ...
|
|
20
20
|
|
|
21
|
-
import '@reuters-graphics/graphics-components/scss/main';
|
|
21
|
+
import '@reuters-graphics/graphics-components/scss/main.scss';
|
|
22
22
|
</script>
|
|
23
23
|
```
|