[[HasOwnProperty]]

# Garrett Smith (16 years ago)

[[HasOwnProperty]] is mentioned in one place in the spec: s 15.4.4.11 Array.prototype.sort (comparefn).

There is no mention of [[HasOwnProperty]] anywhere else.

I also see a [[GetOwnProperty]] definition in Table 8 and a definition for "own property" (s. 4.3.30).

Is there a difference between [[HasOwnProperty]] and "own property"? If not, then one or the other should be used. If so, then [[HasOwnProperty]] should be defined somewhere in the spec.

Garrett

# Mark S. Miller (16 years ago)

[+es5-discuss] Thanks for reporting. But please include es5-discuss on all messages pointing out mistakes in the ES5 spec. It will help us accumulate errata.

# David-Sarah Hopwood (16 years ago)

Garrett Smith wrote:

[[HasOwnProperty]] is mentioned in one place in the spec: s 15.4.4.11 Array.prototype.sort (comparefn).

There is no mention of [[HasOwnProperty]] anywhere else.

I also see a [[GetOwnProperty]] definition in Table 8 and a definition for "own property" (s. 4.3.30).

Is there a difference between [[HasOwnProperty]] and "own property"? If not, then one or the other should be used. If so, then [[HasOwnProperty]] should be defined somewhere in the spec.

Array.prototype.sort should have been defined in terms of [[GetOwnProperty]]. That is, the text in 15.4.4.11 should be

• The result of calling the [[GetOwnProperty]] internal method of

proto with argument ToString(j) is not undefined.

(Incidentally, I don't see any errata for the published standard at es3.1:es3.1_proposal_working_draft.)