- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Thu, 02 Apr 2015 14:56:52 -0400
- To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Per current Web IDL spec, they are: http://heycam.github.io/webidl/#named-properties-object-getownproperty does "Set desc.[[Writable]] to false" in step 8. However, not a single UA implements this. Simple testcase: <div id="x"></div> <script> x = 5; alert(x); </script> This alerts "5", not "[object HTMLDivElement]" in Firefox, Chrome, Safari, IE11, and Presto Opera. Per current spec it should be alerting "[object HTMLDivElement]". I think we should just change the spec here. Specifically, set [[Writable]] to true, which will allow shadowing assignments, while continuing to return false from [[DefineOwnProperty]] (so if you try to actually set the property directly on the named properties object you either no-op or throw depending on strict mode and whatnot). Any objections? -Boris
Received on Thursday, 2 April 2015 18:57:20 UTC