On Sunday, January 27, 2013 at 6:05 PM, Ori Livneh wrote:
On Sunday, January 27, 2013 at 5:53 PM, S Page wrote:
I mean How can an extension's ResourceLoader module have a soft dependency on a module provided by another extension?
- Bind to ResourceLoaderRegisterModules.
- Register the optional module only if its dependencies are present.
- In your extension's JavaScript code, replace the function with a no-op if it is missing: if ( mediaWiki.eventLog == undefined ) mediaWiki.eventLog = { logEvent: function () {} };
Example: https://gist.github.com/4652474