function loadGIResources(jsUrls) {
jsUrls.forEach(({ url, type, defer }) => {
const script = document.createElement(‘script’);
script.src = url;
// script.crossOrigin = ‘anonymous’;
if (type) script.type = type;
if (defer) script.defer = true;
document.head.appendChild(script);
});
}
if (!window.__GI_MEDIA_CAROUSEL_RESOURCES_LOADED__) {
window.__GI_MEDIA_CAROUSEL_RESOURCES_LOADED__ = true;
loadGIResources(
[
{
url: ‘https://www.theglobeandmail.com/files/interactive/components/gi-media-carousel/gi-media-carousel.js’,
type: ‘module’,
defer: false
}
]
);
}
More Stories
Jade Iginla is ready to cause some havoc in the PWHL
Tearful Rory McIlroy wins season-long title on European tour for record-tying eighth time
Mirra Andreeva, 19, beats 32-year-old Elina Svitolina to win WTA finals without losing a set