Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/300689
Change subject: Change EmitterList#insertItem from @private to @protected ...................................................................... Change EmitterList#insertItem from @private to @protected This method was always supposed to be an extendable method, especially when taking into account dealing with widgets (such as GroupWidget) which uses the EmitterList functionality but extends it to interact with the DOM. The tag @private is therefore wrong and should be replaced with @protected. Further explanation (and a warning) was added to the documentation to clarify the use and extension of the method. Bug: T114707 Change-Id: I2e289bdc59246feea16e1a9b224014959ebc9eec --- M src/EmitterList.js 1 file changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/89/300689/1 diff --git a/src/EmitterList.js b/src/EmitterList.js index d5207f8..8a8f084 100644 --- a/src/EmitterList.js +++ b/src/EmitterList.js @@ -238,7 +238,18 @@ * Don't call this directly unless you know what you're doing. * Use #addItems instead. * - * @private + * This method can be extended in child classes to produce + * different behavior when an item is inserted. For example, + * inserted items may also be attached to the DOM or may + * interact with some other nodes in certain ways. Extending + * this method is allowed, but if overriden, the aggregation + * of events must be preserved, or behavior of emitted events + * will be broken. + * + * If you are extending this method, please make sure the + * parent method is called. + * + * @protected * @param {OO.EventEmitter} item Items to add * @param {number} index Index to add items at * @return {number} The index the item was added at -- To view, visit https://gerrit.wikimedia.org/r/300689 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2e289bdc59246feea16e1a9b224014959ebc9eec Gerrit-PatchSet: 1 Gerrit-Project: oojs/core Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits