Closed
Bug 792005
Opened 12 years ago
Closed 10 years ago
Don't throw when setting a named property in non-strict mode
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: Ms2ger, Unassigned)
References
(Blocks 1 open bug)
Details
The spec says:
> If /creating/ is false and /O/ does not implement an interface
> with a named property setter, then Reject.
(<http://dev.w3.org/2006/webapi/WebIDL/#defineownproperty>, step 3.2.1), and
> The term “Reject” is used in the same sense as that defined in
> ECMA-262, namely, to mean “If Throw is true, then throw a
> TypeError exception, otherwise return false”.
but we do
" if (found) {\n"
" return ThrowErrorMessage(cx, MSG_NO_PROPERTY_SETTER, \"%s\");\n" +
" }\n" +
i.e, throw in all modes
Comment 1•10 years ago
|
||
This is worksforme on tip. Testcase:
data:text/html,<img name="foo">
and then in the console:
(function() { "use strict"; document.images.foo = 5 })() /* throws */
document.images.foo = 5 /* does not throw */
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
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
•