mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-01 17:36:35 +00:00
9 lines
250 B
JavaScript
9 lines
250 B
JavaScript
|
/**
|
||
|
* Progressive enhancement for JS core- define things that are scheduled to
|
||
|
* appear in the standard anyway.
|
||
|
*/
|
||
|
|
||
|
if(!Array.prototype.last) Object.defineProperty(Array.prototype, 'last', {
|
||
|
value: function() { return this[this.length - 1] }
|
||
|
});
|