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?
>
> 1) Bind to ResourceLoaderRegisterModules.
> 2) Register the optional module only if its dependencies are present.
> 3) 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
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l