mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-15 03:34:03 +00:00
557fd113c8
Instead of using constructor functions, use factory functions to generate the gateway objects, because of: * Consistency on the approach in the repository, no constructor functions are used, the factory function pattern prevales. * Real private data with closures * No use of `this`, which is dynamic and unbound in JS and a source of errors. In contrast, by using a factory function, the function/methods-of-the-object are tightly bound to the internal data. Additional changes: * Specify more the type of createRESTBaseGateway's parameter to improve clarity on the intent of the parameter * From: @param {jQuery} api * To: @param {Function} ajax function from jQuery for example Supporting documentation: * https://medium.com/javascript-scene/javascript-factory-functions-vs-constructor-functions-vs-classes-2f22ceddf33e Change-Id: Iacbb098b646843a01f459b15343057e2e4851d35 |
||
---|---|---|
.. | ||
ext.popups | ||
ext.popups.core.test.js | ||
ext.popups.desktopRenderer.test.js | ||
ext.popups.renderer.article.test.js | ||
ext.popups.schemaPopups.utils.test.js |