es5-shim: Add polyfill for Object.create
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 28 Jul 2014 19:17:21 +0000 (20:17 +0100)
committerKrinkle <krinklemail@gmail.com>
Tue, 26 Aug 2014 16:52:05 +0000 (16:52 +0000)
commitb4df18c1758160586dde20f4cfd072379edc339d
treea67db13cb33bf255095aeb81ca1c97daa50b6cf1
parent6a7b192a0a38ac578f93e269b636d60538155d5e
es5-shim: Add polyfill for Object.create

Follows-up fff9a814f2327eb. Per the OOjs readme, it requires:

> (..) parser compatibility with ES3 engines.
> To support ES3 engines, ensure an appropriate polyfill is
> loaded for these methods:
> * Array.isArray
> * Object.create (basic use only)
> * Object.keys
> * JSON.stringify

The es5-shim and oojs modules already provide JSON, and most
Array and Object methods. Except for Object.create because there
are a few features in it that can't be emulated, and hence
es5-shim refuses to ship the polyfill for it.

Bug: 67590
Change-Id: I4838d78f77a3a71f80e6750adb914213b5ca4df5
resources/Resources.php
resources/src/polyfill-object-create.js [new file with mode: 0644]