mediawiki-extensions-Visual.../modules/parser/core-upgrade.js
Gabriel Wicke 350e700d8f Add core-upgrade
Change-Id: I5ad0955e8272d376f009f89461bed310978b25e4
2012-06-06 15:58:17 +02:00

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] }
});