W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2012

Re: [whatwg] Location object identity and navigation behavior

From: Bobby Holley <bobbyholley@gmail.com>
Date: Tue, 20 Nov 2012 10:40:16 -0800
Message-ID: <CAKBxTcKoaV64huR=7QxK4Y245WONoMnqqV_yA15JFrb+FGX7DA@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: whatwg <whatwg@lists.whatwg.org>, Matt Wobensmith <mwobensmith@mozilla.com>, Boris Zbarsky <bzbarsky@mit.edu>, Adam Barth <w3c@adambarth.com>, Johnny Stenback <jst@mozilla.com>
On Tue, Nov 20, 2012 at 9:46 AM, Ian Hickson <ian@hixie.ch> wrote:

> Given the way JavaScript works, I just don't see a sane way to make a
> non-symmetric model work. JS just allows too much introspection. Any time
> you pass a string from one to the other, you're also passing a way for the
> callee to call back into the caller, for example (via the string's
> methods). Passing any sort of structured objects similarly means passing
> mehods. Callbacks are also a very widely used pattern.

We actually implement this. It's pretty off-topic for the thread at this
point, but I'd be happy to talk about it in a separate thread or on IRC if
you're interested. I'd also be interested to hear your thoughts about it.

Anyway, we're kind of getting away from the original topic here, which
> isn't fully resolved; Location.
> In thinking about this further last night, it struck me that while the
> proposed proxy mechanism was IMHO overly complex, there might be a simpler
> mechanism that still gets all the compatibility needs, and works for
> Mozilla, and isn't quite so crazy. I'm not a huge fan of this, but I'd be
> interested in what Adam thinks of it.
> Right now, as specced, each Document gets a Location object, but they all
> act the same: they all work on the active document and they all do
> security checks based on the active document, not the Location's Document.
> But what if, instead, we had one Location per Document, and it worked on
> that Document (not the active document), with the security policy being
> like Window, specific to its Document's effective origin, but instead of
> ever getting references to it, you only got references to a proxy that
> acted on the active document's Location?

Wouldn't this effectively mean having a LocationProxy, just like
WindowProxy? I'm certainly all for it, and think that it makes things much
more sane, though I don't understand why this wouldn't "propagate the
magic" that Adam doesn't want to propagate. I might be misunderstanding you
though. Can you clarify?
Received on Tuesday, 20 November 2012 21:22:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:48 UTC