Closed Bug 886559 Opened 12 years ago Closed 12 years ago

Calling hasOwnProperty('detail') on a CustomEvent that was instantiated with {detail: something} returns false

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jordan.garcia, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36 Steps to reproduce: var c = new CustomEvent('someEvent', {detail: 'bar'}); Object.prototype.hasOwnProperty.call(c, 'detail'); Actual results: returns false Expected results: returns true
It seems to be similar to bug 879605
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
It does, yes. Also reproducible with the simpler var c = new CustomEvent('someEvent', {detail: 'bar'}); c.hasOwnProperty('detail');
Assignee: general → nobody
Component: JavaScript Engine → DOM
OS: Mac OS X → All
Hardware: x86 → All
Version: 21 Branch → Trunk
detail is a getter in the prototype object of CustomEvent, not in the event itself. Blink and webkit tend to put properties to the object itself, not to the prototype as the specs says.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Olli, Could you please link to the part of the spec that mentions this. I could not find it. Thanks
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.