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

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

From: Adam Barth <w3c@adambarth.com>
Date: Tue, 25 Sep 2012 17:05:58 -0700
Message-ID: <CAJE5ia_o_5wf_q9Ga6htWvs_14GmcE=gk69eEes2+e9WGmkZ7g@mail.gmail.com>
To: Cameron McCormack <cam@mcc.id.au>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, whatwg <whatwg@lists.whatwg.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Tue, Sep 25, 2012 at 4:58 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> Boris Zbarsky:
>> So we have indications that making everything on this
>> interface unforgeable is sufficiently web-compatible.
> 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 think that's the least amount of crazy.
> This would make Location.prototype empty.  Is that OK?

That looks like what Chrome does:

$ location.__proto__.hasOwnProperty("href")
$ location.__proto__.hasOwnProperty("host")

Received on Wednesday, 26 September 2012 00:07:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC