archives

« Bugzilla Issues Index

#523 — 15.5.4.5 Bugs in String.prototype.codePointAt


(1) "the UTF-16 encode code point value" -> "the code point value of the code unit sequence"

(2) "NaN" -> "undefined" (twice). Yes, that "undefined" was intentional - while NaN is what charCodeAt returns, I consider that a bug, because NaN is not a valid code point or code unit, and the normal convention in ECMAScript is to return undefined when a client asks for something that doesn't exist.

(3) remove "(leftmost)". We're not talking about rendering here, and which element is rendered leftmost depends on the element sequence within the string as well as the context in which it is rendered.

(4) do we need the complicated explanation of indexing in this step anyway? Other methods, such as indexOf, seem to do fine with "the code unit at position k+j of S".


fixed in editor's draft


fixed in rev10, Sept. 27 2012 draft


Checked in rev 26 draft:

(1) problem still exists.

(2)-(4) are fixed.


fixed in rev27 editor's draft

but I didn't use the phrase "code unit sequence" because that sounds like it might include the possibility of sequences that encode more than one code unit.


fixed in rev27 draft


Verified in rev 28 draft.