Closed Bug 886976 Opened 11 years ago Closed 9 years ago
For ES6, all Reg
Exp properties except last Index should be accessors
In order to support invariants of the language (frozen properties can't change) as well as the web reality that `RegExp.prototype.compile` exists (which can change the value of a RegExp's properties), ES6 changes all the instance properties (except lastIndex, which is writable) to accessors on `RegExp.prototype`. See ES6 spec (May 2013 revision) sections: * get RegExp.prototype.global - 18.104.22.168 * get RegExp.prototype.ignoreCase - 22.214.171.124 * get RegExp.prototype.multiline - 126.96.36.199 * get RegExp.prototype.source - 188.8.131.52 * get RegExp.prototype.sticky - 184.108.40.206 There is an obvious potential backward compatibility hazard with this change. See also: https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-03/mar-13.md#regexp-global-ignorecase-multiline-source-sticky-are-now-prototype-accessor-properties-rather-than-instance-own-data-properties
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.