W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2012

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

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 23 Oct 2012 21:45:47 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
Message-ID: <Pine.LNX.4.64.1210232141000.2478@ps20323.dreamhostps.com>
Cc: Cameron McCormack <cam@mcc.id.au>, whatwg@lists.whatwg.org
On Fri, 28 Sep 2012, Boris Zbarsky wrote:
> On 9/28/12 12:44 AM, Cameron McCormack wrote:
> > What about other functions from Object.prototype, by the way?
> > toLocaleString, watch, hasOwnProperty, etc.?  If there are a bunch of
> > properties (that don't correspond to IDL members) that need protecting,
> > maybe handling it in [DefineOwnProperty] is the simplest thing to do.
> 
> I don't think the rest of those need protecting for Location.  And 
> simply making valueOf an own non-configurable property is a lot simpler 
> than creating yet another custom [DefineOwnProperty] implementation, at 
> least in Gecko, and has the benefit of not being weird magic from the 
> point of view of the web page.  I can't speak for other 
> implementations...

heycam, bz, what's the conclusion on this? Should I stick [Unforgeable] on 
the interface to make everything in that interface unforgeable? Should I 
define a valueOf and make just that, the toString serializer, and href 
unforgeable? Something else?

Incidentally there's also a request to mark the 'location' attribute 
itself (on Document, presumably also the one on Window) unforgeable:

   https://www.w3.org/Bugs/Public/show_bug.cgi?id=19560

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 23 October 2012 21:46:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:11 GMT