Jforrester has uploaded a new change for review. https://gerrit.wikimedia.org/r/171607
Change subject: Update OOjs to v1.1.2 ...................................................................... Update OOjs to v1.1.2 Release notes: https://git.wikimedia.org/blob/oojs%2Fcore.git/v1.1.2/History.md Change-Id: If0634147a2a01e10c66acc3c8f335d3d15cf7180 --- M resources/lib/oojs/oojs.jquery.js 1 file changed, 4 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/07/171607/1 diff --git a/resources/lib/oojs/oojs.jquery.js b/resources/lib/oojs/oojs.jquery.js index c62df22..f8a990c 100644 --- a/resources/lib/oojs/oojs.jquery.js +++ b/resources/lib/oojs/oojs.jquery.js @@ -1,12 +1,12 @@ /*! - * OOjs v1.1.1 optimised for jQuery + * OOjs v1.1.2 optimised for jQuery * https://www.mediawiki.org/wiki/OOjs * * Copyright 2011-2014 OOjs Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * - * Date: 2014-09-11T00:40:09Z + * Date: 2014-11-06T17:42:36Z */ ( function ( global ) { @@ -506,11 +506,6 @@ if ( context === undefined || context === null ) { throw new Error( 'Method name "' + method + '" has no context.' ); } - if ( !( method in context ) ) { - // Technically the method does not need to exist yet: it could be - // added before call time. But this probably signals a typo. - throw new Error( 'Method not found: "' + method + '"' ); - } if ( typeof context[method] !== 'function' ) { // Technically the property could be replaced by a function before // call time. But this probably signals a typo. @@ -593,7 +588,7 @@ validateMethod( method, context ); - if ( !( event in this.bindings ) || !this.bindings[event].length ) { + if ( !hasOwn.call( this.bindings, event ) || !this.bindings[event].length ) { // No matching bindings return this; } @@ -632,7 +627,7 @@ oo.EventEmitter.prototype.emit = function ( event ) { var i, len, binding, bindings, args, method; - if ( event in this.bindings ) { + if ( hasOwn.call( this.bindings, event ) ) { // Slicing ensures that we don't get tripped up by event handlers that add/remove bindings bindings = this.bindings[event].slice(); args = Array.prototype.slice.call( arguments, 1 ); -- To view, visit https://gerrit.wikimedia.org/r/171607 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0634147a2a01e10c66acc3c8f335d3d15cf7180 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Jforrester <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
