[heycam/webidl] How to deal with Location (#660)

bz brought up `WindowProxy` again, #655 reminded me of our other favorite object, `Location`. This is how HTML defines a `Location` object is created:

> To create a Location object, run these steps:
>
> 1. Let location be a new Location platform object.
> 2. Perform ! location.[[DefineOwnProperty]]("valueOf", { [[Value]]: %ObjProto_valueOf%, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }).
> 3. Perform ! location.[[DefineOwnProperty]](@@toPrimitive, { [[Value]]: undefined, [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }).
> 4. Set the value of the [[DefaultProperties]] internal slot of location to location.[[OwnPropertyKeys]]().
> 5. Return location.

The overridden internal methods are handled via awkward prose (which we could put between step 4 and 5 somehow). If the situation @jmdyck describes in https://github.com/heycam/webidl/issues/655#issuecomment-467472205 persists however and you need to state upfront that something is an exotic object we have a problem and need hooks from IDL.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/660

Received on Tuesday, 26 February 2019 15:12:08 UTC