Re: Defining exotic objects in IDL, HTML, or both?

On Mon, Oct 19, 2015 at 8:06 AM, Bobby Holley <bholley@mozilla.com> wrote:
> Hm, you may be right that this is the sanest way to make this ES-compatible,
> especially if the observables are the same (I can't think of any
> contradictions at the moment, but my brain is tired right now). We still
> need minting for the functions, and we need to clear those cached functions
> every time document.domain is set. But with that I think it should work (but
> again, tired).

Ah yes. Would it make sense to simply make the "effective script
origin" part of the keying tuple? And I guess this "cache" is a
WeakMap so the handed out functions can be GC'd?


> Well, there's still the stuff on Window, which begs the question of the
> behavior here, but that's probably fine if we do the proxy thing. In the
> cross-origin case Window.close is an own property, in the same-origin case
> it lives on the prototype.

Yeah, Window seems like a distinct problem since it already has a dual
setup with WindowProxy and Window. And it is not marked [Unforgeable]
which means same-origin and cross-origin will differ quite a bit.
Adding CrossOriginWindow might be what is needed there or perhaps
overloading WindowProxy though that seems tricky.


-- 
https://annevankesteren.nl/

Received on Monday, 19 October 2015 14:07:04 UTC