Geen bewerkingssamenvatting |
Geen bewerkingssamenvatting |
||
Regel 11: | Regel 11: | ||
} | } | ||
RLQ.push(function () { | RLQ.push(function () { | ||
if (typeof mw | function waitForMwLoaderUsing(callback) { | ||
console. | 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.