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)
Core
DOM: Core & HTML
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
Comment 1•12 years ago
|
||
It seems to be similar to bug 879605
Assignee: nobody → general
Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Comment 2•12 years ago
|
||
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
Comment 3•12 years ago
|
||
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
Reporter | ||
Comment 4•12 years ago
|
||
Olli,
Could you please link to the part of the spec that mentions this. I could not find it.
Thanks
Comment 5•12 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•