Closed Bug 791537 Opened 12 years ago Closed 12 years ago

Getting Interface.prototype.attribute directly should throw TypeError

Categories

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

defect
Not set
trivial

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ayg, Unassigned)

References

Details

data:text/html,<!doctype html> <script> try { NodeList.prototype.length } catch(e) { document.documentElement.textContent = e.name } </script> Nightly 2012-09-16: Error IE10 Developer Preview: TypeError Chrome 23 dev, Opera 12.50 internal: n/a The spec requires IE's behavior, AFAICT: http://dev.w3.org/2006/webapi/WebIDL/#es-attributes If I understand correctly, the getter is being called on NodeList.prototype, which is not a platform object implementing the interface on which "length" is declared, so it should be TypeError. An incorrect exception type is also thrown for accessing XMLHttpRequest.prototype.status this way (NS_ERROR_XPC_BAD_CONVERT_JS).
Should retest after bug 742191 lands.
Depends on: 742191
Depends on: 791774
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
This is probably tested by idlharness.js, which is probably how I found it in the first place, but I didn't confirm.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.