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)
Core
DOM: Core & HTML
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).
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Reporter | ||
Comment 2•12 years ago
|
||
This is probably tested by idlharness.js, which is probably how I found it in the first place, but I didn't confirm.
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
•