mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
oojs: Update to upstream v1.0.2
* http://trevorparscal.github.io/oojs/releases/oo-1.0.2.js * https://github.com/trevorparscal/oojs/blob/v1.0.2/History.md * https://github.com/trevorparscal/oojs/compare/v1.0.1...v1.0.2 Change-Id: I7378b7cbef55243845d3f4cbc96406b3267c8c01
This commit is contained in:
parent
faeb27c477
commit
01f9c702b4
|
@ -1,12 +1,12 @@
|
|||
/*!
|
||||
* Object Oriented JavaScript Library v1.0.1
|
||||
* Object Oriented JavaScript Library v1.0.2
|
||||
* https://github.com/trevorparscal/oojs
|
||||
*
|
||||
* Copyright 2011-2013 OOJS Team and other contributors.
|
||||
* Released under the MIT license
|
||||
* http://oojs.mit-license.org
|
||||
*
|
||||
* Date: Thu Jun 06 2013 17:25:38 GMT+0200 (CEST)
|
||||
* Date: Thu Jul 25 04:28:57 2013 GMT+0200 (CEST)
|
||||
*/
|
||||
( function ( global ) {
|
||||
|
||||
|
@ -94,10 +94,15 @@ oo.inheritClass = function ( targetFn, originFn ) {
|
|||
|
||||
var targetConstructor = targetFn.prototype.constructor;
|
||||
|
||||
targetFn.prototype = Object.create( originFn.prototype );
|
||||
|
||||
// Restore constructor property of targetFn
|
||||
targetFn.prototype.constructor = targetConstructor;
|
||||
targetFn.prototype = Object.create( originFn.prototype, {
|
||||
// Restore constructor property of targetFn
|
||||
constructor: {
|
||||
value: targetConstructor,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
configurable: true
|
||||
}
|
||||
} );
|
||||
|
||||
// Extend static properties - always initialize both sides
|
||||
originFn.static = originFn.static || {};
|
||||
|
@ -238,6 +243,11 @@ oo.getObjectValues = function ( obj ) {
|
|||
*/
|
||||
oo.compare = function ( a, b, asymmetrical ) {
|
||||
var aValue, bValue, aType, bType, k;
|
||||
|
||||
if ( a === b ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for ( k in a ) {
|
||||
aValue = a[k];
|
||||
bValue = b[k];
|
||||
|
|
Loading…
Reference in a new issue