W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2012

Re: Spec for location object needs to make some properties unforgeable; need supporting WebIDL changes

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Tue, 25 Sep 2012 21:16:13 -0400
Message-ID: <5062575D.2010001@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: whatwg <whatwg@lists.whatwg.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 9/25/12 7:58 PM, Cameron McCormack wrote:
> OK.  I propose then that we allow [Unforgeable] on the interface, which
> means:
>
> * attributes get own, non-configurable accessor properties (with setters
> if they are not readonly attributes), and no property on the prototype
> * operations get own, non-configurable, non-writable properties, and no
> property on the prototype
> * the stringifier gets an own, non-configurable, non-writable toString
> property, and no property on the prototype
> * there is an own, non-configurable, non-writable valueOf property that
> just returns this

I can live with this, but why is this better than just allowing 
[Unforgeable] on all operations and attributes and defining an "object 
valueOf(); /* returns self */ " on Location?

> This would make Location.prototype empty.  Is that OK?

It seems to already be empty in Chrome, unless I screwed up my testing. 
  And maybe in IE.  Location.prototype per se doesn't even exist in 
Safari, iirc, though location.__proto__ is nonempty...

So yeah, I think it would be OK.

-Boris
Received on Wednesday, 26 September 2012 01:16:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC