From: James D. Forrester Date: Tue, 3 Apr 2018 20:37:46 +0000 (-0700) Subject: Update OOjs to v2.2.0 X-Git-Tag: 1.31.0-rc.0~216 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=8d68145a16c3bdf1c42dec80b4294592bfd09af0 Update OOjs to v2.2.0 Release notes: https://gerrit.wikimedia.org/r/plugins/gitiles/oojs/core/+/v2.2.0/History.md Change-Id: If2f673da4c2f6c1576620d96ed28ac4c538ba119 --- diff --git a/maintenance/resources/update-oojs.sh b/maintenance/resources/update-oojs.sh index 267bd96170..f99bb7d756 100755 --- a/maintenance/resources/update-oojs.sh +++ b/maintenance/resources/update-oojs.sh @@ -52,7 +52,7 @@ COMMITMSG=$(cat < 1 && ( prop = props.pop() ) && oo.isPlainObject( prop ) && !Object.keys( prop ).length ) { delete props[ props.length - 1 ][ arguments[ props.length ] ]; } }; @@ -394,9 +392,7 @@ oo.compare = function ( a, b, asymmetrical ) { for ( k in a ) { if ( !hasOwn.call( a, k ) || a[ k ] === undefined || a[ k ] === b[ k ] ) { - // Support es3-shim: Without the hasOwn filter, comparing [] to {} will be false in ES3 - // because the shimmed "forEach" is enumerable and shows up in Array but not Object. - // Also ignore undefined values, because there is no conceptual difference between + // Ignore undefined values, because there is no conceptual difference between // a key that is absent and a key that is present but whose value is undefined. continue; } @@ -685,17 +681,17 @@ oo.isPlainObject = $.isPlainObject; /** * @private - * @param {OO.EventEmitter} ee - * @param {Function|string} method Function or method name + * @param {OO.EventEmitter} eventEmitter Event emitter + * @param {string} event Event name * @param {Object} binding */ - function addBinding( ee, event, binding ) { + function addBinding( eventEmitter, event, binding ) { var bindings; // Auto-initialize bindings list - if ( hasOwn.call( ee.bindings, event ) ) { - bindings = ee.bindings[ event ]; + if ( hasOwn.call( eventEmitter.bindings, event ) ) { + bindings = eventEmitter.bindings[ event ]; } else { - bindings = ee.bindings[ event ] = []; + bindings = eventEmitter.bindings[ event ] = []; } // Add binding bindings.push( binding ); @@ -713,8 +709,8 @@ oo.isPlainObject = $.isPlainObject; * @param {Function|string} method Function or method name to call when event occurs * @param {Array} [args] Arguments to pass to listener, will be prepended to emitted arguments * @param {Object} [context=null] Context object for function or method call - * @throws {Error} Listener argument is not a function or a valid method name * @chainable + * @throws {Error} Listener argument is not a function or a valid method name */ oo.EventEmitter.prototype.on = function ( event, method, args, context ) { validateMethod( method, context ); @@ -1332,9 +1328,9 @@ oo.SortedEmitterList.prototype.setSortingCallback = function ( sortingCallback ) /** * Add items to the sorted list. * - * @chainable * @param {OO.EventEmitter|OO.EventEmitter[]} items Item to add or * an array of items to add + * @chainable */ oo.SortedEmitterList.prototype.addItems = function ( items ) { var index, i, insertionIndex; @@ -1400,6 +1396,12 @@ oo.SortedEmitterList.prototype.findInsertionIndex = function ( item ) { /* global hasOwn */ /** + * A map interface for associating arbitrary data with a symbolic name. Used in + * place of a plain object to provide additional {@link #method-register registration} + * or {@link #method-lookup lookup} functionality. + * + * See . + * * @class OO.Registry * @mixins OO.EventEmitter *