Re: [WebIDL] Assigning to constants

Simon Pieters:
> Thanks.
>
> I'm not sure what the implications are, though; are they also readonly in 
> the following cases?
>
>    Node.prototype.ELEMENT_NODE = 'Hello world';
>    Element.prototype.ELEMENT_NODE = 'Hello world';
>    document.documentElement.ELEMENT_NODE = 'Hello world';

Yes.  The properties set for IDL consts on the interface object, the
interface prototype object (or corresponding exception ones) should all
be ReadOnly.  (And the prototype is where the constant comes from in the
document.documentElement.ELEMENT_NODE case.)

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Monday, 16 June 2008 23:39:36 UTC