function loadInteractives()

in ArticleTemplates/assets/js/bootstraps/common.js [368:394]


function loadInteractives(force) {
    let i;
    let bootUrl;
    let interactive;
    let interactives;

    if ((!GU.opts.isOffline || force) && navigator.onLine) {
        interactives = document.querySelectorAll('figure.interactive');

        for (i = 0; i < interactives.length; i++) {
            interactive = interactives[i];
            bootUrl = interactive.dataset.interactive;

            interactive.classList.add('interactive--loading');

            curl([bootUrl], startInteractive.bind(null, interactive), showOfflineInteractiveIcons);
        }
    } else {
        showOfflineInteractiveIcons();
        if (!bootUrl) {
            const reload = document.getElementsByClassName("interactive--offline--icon--reload")[0];
            if (reload) {
                reload.style.display = "none";
            }
        }
    }
}