Le 03/08/2012 12:46, Rick Waldron a écrit :
On Friday, August 3, 2012 at 12:24 PM, David Bruant wrote:
Hi,
A code joke from a colleague [1] revealed [2] that
String.prototype.substr is not part of ES5.1 as normative.
Kangax tables indicate that this property is in all modern browsers [3].
I think it'd be worth moving this method to the normative part of the
spec and that tests be added to test262 (since tests are on a chapter
basis, I assume there is currently none for this method).
The method is in an annex (I'm mobile and can't really look it up).
With slice and substring standardized, there would be a lot repeated
similar functionality
I definitely agree, but I don't think "repetition" is a valid argument
here. I'm concerned about interoperability and backward compatibility.
If all browsers have the same methods, the (normative part of the) spec
should include it. The web platform has all sort of overlapping
technologies to solve the same use cases, but it's important to specify
them all and not only a minimalist subset.
David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss