On Mon, 16 Jun 2008 13:02:05 +0200, Cameron McCormack <[EMAIL PROTECTED]> wrote:

Simon Pieters:
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.

Changed to be { DontDelete, ReadOnly } (but still no exception thrown).

  http://dev.w3.org/cvsweb/2006/webapi/Binding4DOM/Overview.html.diff?r1=1.76&r2=1.77&f=h

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';

--
Simon Pieters
Opera Software

Reply via email to