(Zie JIRA-issue EMT-791.) |
nl>Maickelfu Geen bewerkingssamenvatting |
||
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> |
Versie van 24 jun 2024 14:30
Dit is de Widget:EMMNavigatorTree Widget.