[Bug 17523] Specification should define behavior when immutable values are changed

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17523

--- Comment #4 from Glenn Adams <glenn@skynav.com> ---
(In reply to comment #3)
> This is defined in WebIDL.

Only partly... the key language in WebIDL is [1]:

"The attribute setter is undefined if the attribute is declared readonly and
has neither a [PutForwards] nor a [Replaceable] extended attribute declared on
it."

[1] http://www.w3.org/TR/WebIDL/#es-attributes

in combination with EMCA-262 5.1 definitions of [[Writable]] (8.6.1),
[[CanPut]] (8.12.4), PutValue(V,W) (8.7.2), and definition of strict mode (see
appendix C for a summary).

"The LeftHandSide also may not be a reference to a data property with the
attribute value {[[Writable]]:false}, to an accessor property with the
attribute value {[[Set]]:undefined}, nor to a non-existent property of an
object whose [[Extensible]] internal property has the value false. In these
cases a TypeError exception is thrown (11.13.1)."

See also the note in [1]:

"Note that attempting to assign to a property corresponding to a read only
attribute results in different behavior depending on whether the script doing
so is in strict mode. When in strict mode, such an assignment will result in a
TypeError being thrown. When not in strict mode, the assignment attempt will be
ignored."

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 23 April 2013 00:43:05 UTC