Re: Supporting extra parameters on the Intent object

Just because an object is Transferable doesn't mean it will be transferred,
right?  Shouldn't there be a way to say explicitly that the data should be
transferred instead of copied?

Rick

On Mon, Jan 30, 2012 at 3:00 PM, Greg Billock <gbillock@google.com> wrote:

> Draft spec has Intent.data being any structured-cloneable type,
> including Transferable.
>
> This proposal is more about metadata. So if you want to transfer, say,
> a file, you can say what the filename is. Or other useful "header"
> info not present in the data type as MIME-specified. Not always
> needed, so optional, but handy for when the MIME type isn't "wide
> enough" to fit in the metadata the handler end might find useful in
> working with it.
>
>
> On Mon, Jan 30, 2012 at 11:50 AM, Charles Pritchard <chuck@jumis.com>
> wrote:
> > On 1/29/12 6:18 PM, James Hawkins wrote:
> >>
> >> [Constructor(in string action, in string type, in any data)]
> >> interface Intent {
> >>     readonly attribute DOMString action;
> >>     readonly attribute DOMString type;
> >>     readonly attribute any data;
> >>     readonly attribute Dictionary extras;<--- Added
> >>     void postResult (any data, optional Dictionary extras);<---
> >> |extras| added
> >>     void postFailure (any data);
> >> };
> >>
> >> Client:
> >>
> >> document.getElementById('attach').onclick = function() {
> >>   var intent = new Intent("http://webintents.org/pick", "*");
> >>   navigator.startActivity(intent, filePicked);
> >> });
> >>
> >> Service:
> >>
> >> if (window.intent) {
> >>   ....
> >>   window.intent.postResult(selectedFile, {filename: selectedFilename});
> >> }
> >
> >
> > Where did we land on Transferable [1] objects?
> >
> http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#dom-window-postmessage
> >
> > [1] The "transfer" argument in the postMessage signature:
> > postMessage(message, targetOrigin, transfer)
> >
> >
>
>

Received on Tuesday, 31 January 2012 12:15:32 UTC