W3C home > Mailing lists > Public > public-web-intents@w3.org > January 2012

Re: Supporting extra parameters on the Intent object

From: Paul Kinlan <paulkinlan@google.com>
Date: Mon, 30 Jan 2012 13:30:42 +0000
Message-ID: <CADGdg3AheOaBgi-B-thKgPcRaLDxtZtxGwg+yup6ndXv7Pb3VA@mail.gmail.com>
To: Mounir Lamouri <mounir@lamouri.fr>
Cc: public-web-intents@w3.org
Because we want the data described by the "type", specifically a
mime-type, to describe the just the data being sent.  If you say it is
an image/jpeg it must be a JPEG image that is received (which does not
include the file name), not a JSON object with arbitrary values

Other areas where this can be used are intents like "share" where you
share a text/uri-list (a collection of URL's) and you want it them to
be annotated with the title of the page... this is extra meta-data
that is not core to the data being sent but adds extra value.

Some of these will be able to be defined by a richer type such as
(http://activitystrea.ms/head/activity-schema.html#article) which
might be more relevant in some cases but adds extra overhead and
reduces the number of potential services that might support the


On Mon, Jan 30, 2012 at 1:23 PM, Mounir Lamouri <mounir@lamouri.fr> wrote:
> On 01/30/2012 03:18 AM, 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);
>> };
> Given that |data| is already of type |any| why can't it just be of
> specific type |Dictionary| when needed?
> --
> Mounir

Paul Kinlan
Developer Advocate @ Google for Chrome and HTML5
G+: http://plus.ly/paul.kinlan
t: +447730517944
tw: @Paul_Kinlan
LinkedIn: http://uk.linkedin.com/in/paulkinlan
Blog: http://paul.kinlan.me
Skype: paul.kinlan
Received on Monday, 30 January 2012 13:31:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:58:42 UTC