W3C home > Mailing lists > Public > public-web-intents@w3.org > November 2011

Re: Resource-driven, standard hyperlinks

From: Tony Evans <mail.tony.evans@gmail.com>
Date: Mon, 28 Nov 2011 20:09:28 -0500
Message-Id: <2C7779EB-61BC-429D-8584-5B3AD2FBD3A6@gmail.com>
Cc: "public-web-intents@w3.org" <public-web-intents@w3.org>
To: Paul Kinlan <paulkinlan@google.com>

On Nov 28, 2011, at 4:53 AM, Paul Kinlan <paulkinlan@google.com> wrote:

> Hi Tony,
> Thanks for joining, we have had discussions about using anchors to be
> able to initiate the intents, but not on this list so it would be good
> to document these and the use-cases.
> The questions I had with using anchors are:
> - does the href become redundant?  What is encoded in the href, is it

From my demo app I suggest linking to a separate resource that defines the intent.  At a bare minimum it should contain the action and target.


The href points to that resource.  Add rel="intent" or other semantic markup as desired.

> the intent url (webintents.org/share), or the data? I suspect the
> data, so if the intent system isn't in the browser the user would just
> open the data.
> - do we just have data attributes or define new attributes on the
> DOMAnchorElement?
> - it is one way, you can only start an action but not receive a
> response.  Or would you define a new attribute that is the event for
> the callback?  Something like "onintentresponse"

Most everything else goes into the intent resource pointed at by the href.  I tried to add some extensibility in my resource format: support for meta and link elements based on what can be done in HTML documents, etc.


In my opinion there just wasn't enough room in an anchor tag (or separate protocol / URL schema) to deal with the data and flexibility.  Just use existing attributes for semantic markup or or other info as appropriate.

You want callbacks?  Add link elements that point to appropriate APIs, endpoints, WebHooks, etc to the linked intent resource.  It may not create a nice two-way communications channel, but it should cover the basics.

> There are positives as well:
> - it is declarative
> - might not require javascript to be enabled

One of my lofty goals was to be useable without JavaScript. :)

> Thanks,
> P
> On Sun, Nov 27, 2011 at 2:38 AM, Tony Evans <mail.tony.evans@gmail.com> wrote:
>> Paul Kinlan asked me to join the discussion here and share my thoughts.
>> <snip>
>> Has there been any previous discussion about using standard <a> href
>> tags to link to intents/actions? And meta data on thelinks that
>> indicate it points to an intent/action?
>> --
>> Tony Evans
>> @aevans
> -- 
> 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 Tuesday, 29 November 2011 01:10:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:14:45 UTC