W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2008

Re: [WebIDL] Assigning to constants

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Fri, 13 Jun 2008 04:43:33 +0200
To: Andrew Oakley <andrew@ado.is-a-geek.net>
Cc: public-webapps@w3.org
Message-ID: <tkn354p4ge51aund1saallv66r6k2eolbp@hive.bjoern.hoehrmann.de>

* Andrew Oakley wrote:
>Simon Pieters wrote:
>> 
>> What should happen when you assign something to a constant? e.g.:
>> 
>>    Node.ELEMENT_NODE = 'Hello world';
>> 
>> Web IDL doesn't say, AFAICT. Firefox and Opera allow the assignment. In 
>> WebKit it silently fails. I had expected an exception to be thrown, just 
>> like for readonly attributes.
>> 
>> It'd be good if this was defined.
>> 
>
>http://dev.w3.org/2006/webapi/Binding4DOM/#es-constants says the 
>property has attributes { DontDelete }.  That would imply that it 
>doesn't have the ReadOnly attribute, and as such the assignment should 
>be allowed.

With ReadOnly setting would be silently ignored, without ReadOnly you
know nothing.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Friday, 13 June 2008 02:44:15 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:25 GMT