W3C home > Mailing lists > Public > www-archive@w3.org > October 2015

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

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 19 Oct 2015 16:06:37 +0200
Message-ID: <CADnb78gZuZmZagzLt+Ha6=SEgbVRr_kOJi+AyGx2bjbr2Z1q1w@mail.gmail.com>
To: Bobby Holley <bholley@mozilla.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, Domenic Denicola <d@domenic.me>, Cameron McCormack <cam@mcc.id.au>, www-archive <www-archive@w3.org>
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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:35:26 UTC