This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11175 - Point out that the behaviour of assigning to properties corresponding to read only attributes
Summary: Point out that the behaviour of assigning to properties corresponding to read...
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-30 02:31 UTC by Cameron McCormack
Modified: 2011-04-07 23:24 UTC (History)
4 users (show)

See Also:


Attachments

Description Cameron McCormack 2010-10-30 02:31:56 UTC
Point out in the spec that in the ES binding, read only attributes cause accessor properties to exist with a getter but no setter, which means that assigning to them will be silently ignored normally and will throw an exception in strict mode.

http://www.w3.org/mid/9768D477C67135458BF978A45BCF9B38214AF1@TK5EX14MBXW604.wingroup.windeplo
y.ntdev.microsoft.com
Comment 1 Jonas Sicking (Not reading bugmail) 2010-10-30 03:26:20 UTC
I thought that even in non-strict mode, assigning to a property with a getter but no setter would throw. At least that's been the case in gecko for a long time.

What does ES5 say?
Comment 2 Brendan Eich 2010-10-30 03:35:07 UTC
(In reply to comment #1)
> I thought that even in non-strict mode, assigning to a property with a getter
> but no setter would throw. At least that's been the case in gecko for a long
> time.
> 
> What does ES5 say?

What Cameron said in comment 0.

/be