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

[whatwg] DND: proposal to expose origin

From: Adam Barth <w3c@adambarth.com>
Date: Sun, 19 Feb 2012 16:28:02 -0800
Message-ID: <CAJE5ia_k3G-gQE-7Ome2bY=uVyR9_EJhUFGGf5u0CmDSuQJPoA@mail.gmail.com>
On Sun, Feb 19, 2012 at 2:28 PM, Charles Pritchard <chuck at jumis.com> wrote:
> On 2/17/12 1:35 AM, Anne van Kesteren wrote:
>> Our proposal takes its cues and algorithms from the postMessage API, and
>> allows the source site to restrict drop targets to only those origins which
>> it trusts, and allows drop targets to see which origin was the source of a
>> drag. The majority of the algorithm can be copied from postMessage,
>> including the syntax for allowed target origins.
>> interface DataTransfer {
>> ?...
>> ?readonly attribute DOMString origin;
>> ?void allowTargetOrigin(DOMString targetOrigin);
>> };
> Any chance we could get D&D to pass a window object or message port so we
> could use postMessage?

The source might be in a different unit of related browsing contexts,
which might mean in a different process in a multi-process browser.
In those cases, we wouldn't want to provide a window reference.

> window.open/iframe seems the only way to link; I've used an
> iframe+sharedworker setup before, which works pretty well.

Correct.  That's by design.

Received on Sunday, 19 February 2012 16:28:02 UTC

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