Hi!
It would be useful if RL could have a function similar to importScript() but which accepted two parameters:
- the page where the script is; and
- a callback function which is executed after the script is imported
mw.loader.load() supports urls but has no callback. mw.loader.using() has a callback but supports no urls.
Workaround
$.ajax( 'https// ...', { dataType: 'script', cache: true } ).then( .. )
Or
$.getScript( { url: 'https:// ...', cache: true } ).then( .. )