Re: Registration behavior when action attribute is missing

On Mon, Apr 16, 2012 at 1:54 PM,  <Cathy.Chan@nokia.com> wrote:
> >From the description of registration markup (3.5.1 in [1]):
> [[
> action of type string, readonly
> An opaque string indicating the behavior class the service supports. It is
> recommended that users use a fully qualified URI. If the action attribute is
> missing, the intent Service is assumed to handle display of the provided
> type(s) in the type attributes.
> ]]
>
> What does "assumed to handle display of the provided type(s) in the type
> attributes" mean in practice?

Our original thought was that this would basically mean default action
is "http://webintents.org/view" or whatever synonym means "display the
information." We're now leaning towards this being a bad idea, and
having no action will either mean something else entirely (ie. for
interoperation with registerProtocolHandler type usage or
registerContentHandler usage), or would even be state indicating the
browser should take no registration action.

In short, the intent tag is a bit in flux. If you're reading WhatWG,
Ian Hickson has suggested using the intent tag to do declarative
indication of registerProtocolHandler, registerContentHandler, and web
intents handlers. We see a lot to like with that approach, so assuming
we go that direction, it'll be the authority on the interpretation of
the syntax there.

(Currently our work in Chromium doesn't support the <intent> tag.)

> Also, 3.5 states that
> [[
> The algorithm for matching intents is that the action string provided in
> invocation and registration must match exactly, and the type strings must
> match exactly except for possible [RFC2046] MIME subtype wildcards.
> ]]
> Given that the action string in invocation can never be empty/missing , the
> UA will never attempt to dispatch an intent to a service page with a missing
> action attribute. Wouldn't it be simpler to disallow missing action
> attribute in the registration markup in the first place (except in the case
> of unregistering the intent)?

Short answer is "yes". :-) But the overall syntax may end up meaning
that this is legal usage. Here's one possible future direction:

<intent type="application/x" href="xyz"></intent> could mean "this
handler (xyz) is registered for registerContentHandler type handling
for type "application/x".

It would then probably be legal to trigger this same handler with this call:

navigator.startActivity(new Intent({"type":"application/x", "data":myX_Blob}));

That is, not using "action" would give developers an imperative way to
invoke registered protocol and content handlers.


>
> [1] http://dvcs.w3.org/hg/web-intents/raw-file/tip/spec/Overview.html

Received on Monday, 16 April 2012 23:35:59 UTC