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

Cameron McCormack cam at mcc.id.au
Thu Sep 27 21:44:11 PDT 2012


Boris Zbarsky:
> I guess from my point of view, extending the existing member
> [Unforgeable] to a wider class of members without changing anything else
> about it seems simpler than having two separate meanings to
> [Unforgeable] depending on what it's decorating...  But maybe we're
> thinking about simplicity in different contexts?
>
> (Note we'll still need single-readonly-attribute [Unforgeable] for
> several properties on Window and Document, no matter what we do with
> Location.)

I did forget this.  My simplicity involved getting rid of [Unforgeable] 
interface members, so obviously we can't do that then.

But I don't like having to add a valueOf operation to the IDL.  So maybe 
we can a separately named extended attribute on the interface that 
results in valueOf being unforgeable.

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.



More information about the whatwg mailing list