Closed Bug 784747 Opened 12 years ago Closed 12 years ago

getOwnPropertyDescriptor is missing get/set until __lookupGetter__/__lookupSetter__ is called

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 520882

People

(Reporter: erik, Unassigned)

Details

getOwnPropertyDescriptor returns an invalid descriptor for DOM properties that are accessors. It is missing the get/set fields. > Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML') ({configurable:true, enumerable:true, value:(void 0), writable:true}) However, if I call __lookupGetter__ > HTMLElement.prototype.__lookupGetter__('innerHTML') function innerHTML() { [native code] } The get/set now magically appears. > Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'innerHTML') ({configurable:true, enumerable:true, get:function innerHTML() { [native code] }, set:function innerHTML() { [native code] }})
This is basically bug 520882, though for the specific case of HTMLElement it'll get fixed when we switch to the WebIDL bindings and stop using JSPropertyOps here.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
And bug 773780 is the bug sorta-tracking that at the moment.
You need to log in before you can comment on or make changes to this bug.