(Zie JIRA-issue EMT-791.) |
Geen bewerkingssamenvatting |
||
(2 tussenliggende versies door dezelfde gebruiker niet weergegeven) | |||
Regel 11: | Regel 11: | ||
} | } | ||
RLQ.push(function () { | RLQ.push(function () { | ||
mw.loader.using(['ext.EMMNavigationTree', | function waitForMwLoaderUsing(callback) { | ||
if (typeof mw !== 'undefined' && mw.loader && typeof mw.loader.using === 'function') { | |||
callback(); | |||
} else { | |||
console.warn('mw.loader.using is not available yet. Retrying...'); | |||
setTimeout(function() { | |||
waitForMwLoaderUsing(callback); | |||
}, 100); // Retry every 100 milliseconds | |||
} | |||
} | |||
waitForMwLoaderUsing(function () { | |||
mw.loader.using(['ext.EMMNavigationTree', 'mediawiki.api']) | |||
.then(function () { | |||
console.log('Modules loaded'); | |||
checkIfReadyAndExecute(); | |||
}) | |||
.catch(function (err) { | |||
console.error('Error loading modules:', err); | |||
}); | |||
}); | |||
}); | }); | ||
</script> | </script> | ||
</includeonly> | </includeonly> |
Huidige versie van 24 jun 2024 om 14:30
Dit is de Widget:EMMNavigatorTree Widget.