--- a/spec/Overview.html Wed Mar 14 12:26:42 2012 -0700
+++ b/spec/Overview.html Wed Mar 14 12:34:10 2012 -0700
@@ -477,7 +477,7 @@
pre.sh_sourceCode .sh_attribute { color: #006400; }
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet" type="text/css" charset="utf-8"></head>
- <body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">Web Intents</h1><h2 id="w3c-editor-s-draft-31-january-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 31 January 2012</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/web-intents/">http://www.w3.org/TR/web-intents/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Previous version:</dt><dd>none</dd><dt>Editors:</dt><dd><span>Greg Billock</span>, <a href="http://google.com/">Google</a></dd>
+ <body style="display: inherit; "><div class="head"><p><a href="http://www.w3.org/"><img width="72" height="48" src="http://www.w3.org/Icons/w3c_home" alt="W3C"></a></p><h1 class="title" id="title">Web Intents</h1><h2 id="w3c-editor-s-draft-14-march-2012"><acronym title="World Wide Web Consortium">W3C</acronym> Editor's Draft 14 March 2012</h2><dl><dt>This version:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Latest published version:</dt><dd><a href="http://www.w3.org/TR/web-intents/">http://www.w3.org/TR/web-intents/</a></dd><dt>Latest editor's draft:</dt><dd><a href="http://dev.w3.org/2011/webapps/TODO.html">http://dev.w3.org/2011/webapps/TODO.html</a></dd><dt>Previous version:</dt><dd>none</dd><dt>Editors:</dt><dd><span>Greg Billock</span>, <a href="http://google.com/">Google</a></dd>
<dd><span>James Hawkins</span>, <a href="http://google.com/">Google</a></dd>
<dd><span>Paul Kinlan</span>, <a href="http://google.com/">Google</a></dd>
</dl><p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2012 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <acronym title="World Wide Web Consortium">W3C</acronym> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.</p><hr></div>
@@ -686,30 +686,43 @@
launch multiple Intents simultaneously. Specific Intent objects are
immutable once created.
</p>
- <pre class="idl"><span class="idlInterface" id="idl-def-Intent">[<span class="extAttr">Constructor(in string action, in string type, in any data) raises DOMException</span>]
+ <pre class="idl"><span class="idlInterface" id="idl-def-Intent">[<span class="extAttr">Constructor(in string action, in string type, in optional any
+ data, in optional sequence<Transferable> transferList, in optional dictionary<string> extraData) raises DOMException</span>]
interface <span class="idlInterfaceID">Intent</span> {
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Intent-action">action</a></span>;</span>
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>DOMString</a></span> <span class="idlAttrName"><a href="#widl-Intent-type">type</a></span>;</span>
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>any</a></span> <span class="idlAttrName"><a href="#widl-Intent-data">data</a></span>;</span>
-<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intent-postResult-void-any-data">postResult</a></span> (<span class="idlParam"><span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>);</span>
-<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intent-postFailure-void-any-data">postFailure</a></span> (<span class="idlParam"><span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>string</a></span> <span class="idlMethName"><a href="#widl-Intent-getExtra-string-DOMSTring-key">getExtra</a></span> (<span class="idlParam"><span class="idlParamType"><a>DOMSTring</a></span> <span class="idlParamName">key</span></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intent-postResult-void-any-data--sequence-Transferable">postResult</a></span> (<span class="idlParam"><span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>, <span class="idlParam">optional <span class="idlParamType"><a></a></span> <span class="idlParamName">sequence<transferable></transferable></span></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intent-postFailure-void-any-data">postFailure</a></span> (<span class="idlParam"><span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>);</span>
};</span>
</pre><div id="attributes" class="section"><h4><span class="secno">3.1.1 </span>Attributes</h4><dl class="attributes"><dt id="widl-Intent-action"><code>action</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>This is an opaque string. Chosen strings <em class="rfc2119" title="should">should</em> be namespaced by a
URL namespace convention. The string <em class="rfc2119" title="must not">must not</em> be empty, or the
- constructor <em class="rfc2119" title="must">must</em> throw an exception.<div><em>No exceptions.</em></div></dd><dt id="widl-Intent-data"><code>data</code> of type <span class="idlAttrType"><a>any</a></span>, readonly</dt><dd>The object used <em class="rfc2119" title="must">must</em> be an object upon which the structured clone
+ constructor <em class="rfc2119" title="must">must</em> throw an exception.</dd><dt id="widl-Intent-data"><code>data</code> of type <span class="idlAttrType"><a>any</a></span>, readonly</dt><dd>The object used <em class="rfc2119" title="must">must</em> be an object upon which the structured clone
algorithm can be performed, including Transferables, or the constructor <em class="rfc2119" title="must">must</em>
- throw an exception.<div><em>No exceptions.</em></div></dd><dt id="widl-Intent-type"><code>type</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>The data payload <em class="rfc2119" title="must">must</em> be described by the type parameter.
+ throw an exception.</dd><dt id="widl-Intent-type"><code>type</code> of type <span class="idlAttrType"><a>DOMString</a></span>, readonly</dt><dd>The data payload <em class="rfc2119" title="must">must</em> be described by the type parameter.
Recommended type strings are MIME strings or self-documenting urls. The
- string <em class="rfc2119" title="must not">must not</em> be empty, or the constructor <em class="rfc2119" title="must">must</em> throw an exception.<div><em>No exceptions.</em></div></dd></dl></div><div id="methods" class="section"><h4><span class="secno">3.1.2 </span>Methods</h4><dl class="methods"><dt id="widl-Intent-postFailure-void-any-data"><code>postFailure</code></dt><dd><b>Only present when the Intent object is delivered to the Service
+ string <em class="rfc2119" title="must not">must not</em> be empty, or the constructor <em class="rfc2119" title="must">must</em> throw an exception.</dd></dl></div><div id="methods" class="section"><h4><span class="secno">3.1.2 </span>Methods</h4><dl class="methods"><dt id="widl-Intent-getExtra-string-DOMSTring-key"><code>getExtra</code></dt><dd>Retrieves the value (if any) from the extra data dictionary this
+ intent was constructed with.<table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">key</td><td class="prmType"><code><a>DOMSTring</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>string</a></code></div></dd><dt id="widl-Intent-postFailure-void-any-data"><code>postFailure</code></dt><dd><b>Only present when the Intent object is delivered to the Service
page.</b> The payload passed to this method will be returned to the onFailure
callback registered by the client page in the startActivity call (if any).
The playload must be an object upon which the structured clone algorithm
- can be performed, including Transferables. [<cite><a class="bibref" rel="biblioentry" href="#bib-HTML5">HTML5</a></cite>]<table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-Intent-postResult-void-any-data"><code>postResult</code></dt><dd><b>Only present when the Intent object is delivered to the
+ can be performed, including Transferables. [<cite><a class="bibref" rel="biblioentry" href="#bib-HTML5">HTML5</a></cite>]<table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd><dt id="widl-Intent-postResult-void-any-data--sequence-Transferable"><code>postResult</code></dt><dd><b>Only present when the Intent object is delivered to the
Service page.</b> The payload passed to this method will be returned to the onSuccess
callback registered by the client page in the startActivity call (if any).
The payload must be an object upon which the structured clone algorithm can be
- performed, including Transferables. [<cite><a class="bibref" rel="biblioentry" href="#bib-HTML5">HTML5</a></cite>] <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr></table><div><em>No exceptions.</em></div><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
- </div>
+ performed. The Transferables array, if present, will specify
+ transferable elements in the |data| payload argument, as per
+ [<cite><a class="bibref" rel="biblioentry" href="#bib-HTML5">HTML5</a></cite>] [[!http://dev.w3.org/html5/postmsg/]]<table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">sequence<Transferable></td><td class="prmType"><code><a></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+ <p>
+ Notes on the intent object: The transferList parameter is not available
+ post-creation. It becomes an internal implementation detail directing the
+ User Agent to interpret some fields of the |data| argument as Transferable. The
+ |data| and |transferList| arguments <em class="rfc2119" title="must">must</em> be implemented following the <acronym title="World Wide Web Consortium">W3C</acronym>
+ Web Messaging spec [[!http://dev.w3.org/html5/postmsg/]].
+ </p>
+ </div>
<div id="invocation-api" class="section">
<h3><span class="secno">3.2 </span>Invocation API</h3>
@@ -723,9 +736,9 @@
</p>
<pre class="idl"><span class="idlInterface" id="idl-def-Intents">[<span class="extAttr">NoInterfaceObject</span>]
interface <span class="idlInterfaceID">Intents</span> {
-<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intents-startActivity-void-Intent-intent--onSuccess--onFailure">startActivity</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></span> <span class="idlParamName">intent</span></span>, <span class="idlParam">optional <span class="idlParamType"><a></a></span> <span class="idlParamName">onSuccess</span></span>, <span class="idlParam">optional <span class="idlParamType"><a></a></span> <span class="idlParamName">onFailure</span></span>) raises (<span class="idlRaises"><a>DOMException</a></span>);</span>
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-Intents-startActivity-void-Intent-intent-callback-onSuccess-callback-onFailure">startActivity</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></span> <span class="idlParamName">intent</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>callback</a></span> <span class="idlParamName">onSuccess</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>callback</a></span> <span class="idlParamName">onFailure</span></span>);</span>
};</span>
-</pre><div id="methods-1" class="section"><h4><span class="secno">3.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-Intents-startActivity-void-Intent-intent--onSuccess--onFailure"><code>startActivity</code></dt><dd>Called to invoke an intent service. The Intent object is described
+</pre><div id="methods-1" class="section"><h4><span class="secno">3.2.1 </span>Methods</h4><dl class="methods"><dt id="widl-Intents-startActivity-void-Intent-intent-callback-onSuccess-callback-onFailure"><code>startActivity</code></dt><dd>Called to invoke an intent service. The Intent object is described
above. The onSuccess handler, if any, will be called by the user agent if
the service is dispatched, processes the intent, and calls postResult on
the Intent object it receives. The handler will be invoked with one
@@ -738,15 +751,33 @@
User Agents <em class="rfc2119" title="should">should</em> restrict this method to only be successfully callable within the
context of an explicit user gesture.
- <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">intent</td><td class="prmType"><code><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">onSuccess</td><td class="prmType"><code><a></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr><tr><td class="prmName">onFailure</td><td class="prmType"><code><a></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><table class="exceptions"><tr><th>Exception</th><th>Description</th></tr><tr><td class="excName"><a>DOMException</a></td><td class="excDesc">
- An exception <em class="rfc2119" title="may">may</em> be thrown if the intent is unfit for the stated intent.
- For example, the Intent is malformed (i.e. null) or the method is invoked without
- being the result of an explicit user gesture.
- </td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+ <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">intent</td><td class="prmType"><code><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></code></td><td class="prmNullFalse">✘</td><td class="prmOptFalse">✘</td><td class="prmDesc"></td></tr><tr><td class="prmName">onSuccess</td><td class="prmType"><code><a>callback</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr><tr><td class="prmName">onFailure</td><td class="prmType"><code><a>callback</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
<p>
The invocation API is implemented by the <code>window.navigator</code> object.
</p>
<pre class="idl"><span class="idlImplements"><a>Navigator</a> implements <a href="#idl-def-Intents" class="idlType"><code>Intents</code></a>;</span></pre><div class="idlImplementsDesc"><p>All instances of the <code><a>Navigator</a></code> type are defined to also implement the <a href="#idl-def-Intents" class="idlType"><code>Intents</code></a> interface.</p></div>
+
+ <div class="section">
+ <p>The callbacks passed to startActivity <em class="rfc2119" title="must">must</em> provide these signatures:</p>
+
+ <pre class="idl"><span class="idlInterface" id="idl-def-IntentSuccessCallback">[<span class="extAttr">NoInterfaceObject</span>]
+interface <span class="idlInterfaceID">IntentSuccessCallback</span> {
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-IntentSuccessCallback-onSuccess-void-any-data-MessagePortArray-ports">onSuccess</a></span> (<span class="idlParam">optional <span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>MessagePort</a>[]</span> <span class="idlParamName">ports</span></span>);</span>
+};</span>
+</pre><div class="section"><h5 id="methods-2">Methods</h5><dl class="methods"><dt id="widl-IntentSuccessCallback-onSuccess-void-any-data-MessagePortArray-ports"><code>onSuccess</code></dt><dd>The |data| passed will be the payload data from the structured
+ cloneable object passed to the postResult method of the delivered Intent.
+ The |ports| will be any ports in the payload, as resulting from the structured
+ clone algorithm with Transferables, as in the Web Messaging spec.
+ [[!http://dev.w3.org/html5/postmsg/]]
+ <table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr><tr><td class="prmName">ports</td><td class="prmType"><code><a>MessagePort</a>[]</code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+
+ <pre class="idl"><span class="idlInterface" id="idl-def-IntentFailureCallback">interface <span class="idlInterfaceID">IntentFailureCallback</span> {
+<span class="idlMethod"> <span class="idlMethType"><a>void</a></span> <span class="idlMethName"><a href="#widl-IntentFailureCallback-onFailure-void-any-data">onFailure</a></span> (<span class="idlParam">optional <span class="idlParamType"><a>any</a></span> <span class="idlParamName">data</span></span>);</span>
+};</span>
+</pre><div class="section"><h5 id="methods-3">Methods</h5><dl class="methods"><dt id="widl-IntentFailureCallback-onFailure-void-any-data"><code>onFailure</code></dt><dd>The |data| passed will be the payload data passed to the postFailure
+ method of the delivered Intent.<table class="parameters"><tr><th>Parameter</th><th>Type</th><th>Nullable</th><th>Optional</th><th>Description</th></tr><tr><td class="prmName">data</td><td class="prmType"><code><a>any</a></code></td><td class="prmNullFalse">✘</td><td class="prmOptTrue">✔</td><td class="prmDesc"></td></tr></table><div><em>Return type: </em><code><a>void</a></code></div></dd></dl></div>
+ </div>
+
</div>
<div id="delivery-and-response-api" class="section">
@@ -761,7 +792,7 @@
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></span> <span class="idlAttrName"><a href="#widl-IntentProvider-intent">intent</a></span>;</span>
};</span>
</pre><div id="attributes-1" class="section"><h4><span class="secno">3.3.1 </span>Attributes</h4><dl class="attributes"><dt id="widl-IntentProvider-intent"><code>intent</code> of type <span class="idlAttrType"><a href="#idl-def-Intent" class="idlType"><code>Intent</code></a></span>, readonly</dt><dd>The intent object as delivered to the service page (includes
- postResult and postFailure methods).<div><em>No exceptions.</em></div></dd></dl></div>
+ postResult and postFailure methods).</dd></dl></div>
<pre class="idl"><span class="idlImplements"><a>DOMWindow</a> implements <a href="#idl-def-IntentProvider" class="idlType"><code>IntentProvider</code></a>;</span></pre><div class="idlImplementsDesc"><p>All instances of the <code><a>DOMWindow</a></code> type are defined to also implement the <a href="#idl-def-IntentProvider" class="idlType"><code>IntentProvider</code></a> interface.</p></div>
<p>
@@ -777,7 +808,7 @@
<p>
The <code>window.intent</code> object <em class="rfc2119" title="must">must</em> be made available across
same-origin redirects of the service page. It <em class="rfc2119" title="must not">must not</em> be available if
- redirects cross a same-origin boundary.
+ redirects cross an origin boundary.
</p>
<p>
So the following redirect sequence
@@ -807,9 +838,9 @@
In other words, in the browsing context in which the Intent is originally
delivered, the intent data <em class="rfc2119" title="must">must</em> be available to pages in a redirect or
navigation sequence when they are in the same origin as that to which it was originally
- delivered, but <em class="rfc2119" title="must not">must not</em> be available to any other pages. This allows Service
- pages to delegate handling, to redirect to login screens, and so forth, but
- does not make the Intent data available to any such pages encountered which
+ delivered (and have the enabling markup), but <em class="rfc2119" title="must not">must not</em> be available to any other pages.
+ This allows Service pages to delegate handling, to redirect to login screens,
+ and so forth, but does not make the Intent data available to any such pages encountered which
are not in the same origin.
</p>
</div>
@@ -817,17 +848,17 @@
<div id="registration-markup" class="section">
<h3><span class="secno">3.4 </span>Registration Markup</h3>
<p>
- Service pages declaratively mark themselves as providing handling
- functionality for particular intent actions and types. A User Agent <em class="rfc2119" title="must not">must not</em>
- deliver an Intent to a page which does not include markup describing what
- intents it can handle which matches the intent being delivered. 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 [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2046">RFC2046</a></cite>] MIME subtype wildcards. MIME parameters
- specified in the Service page markup will be checked and must match exactly,
- except for MIME-formatted strings with MIME subtype wildcards. MIME
- parameters which are included in the intent and which are not specified do
- not impact delivery.
+ Service pages declaratively mark themselves (or other on-domain pages)
+ as providing handling functionality for particular intent actions and types.
+ A User Agent <em class="rfc2119" title="must not">must not</em> deliver an Intent to a web app service page which
+ does not include markup describing what intents it can handle which matches
+ the intent being delivered. 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 [<cite><a class="bibref" rel="biblioentry" href="#bib-RFC2046">RFC2046</a></cite>]
+ MIME subtype wildcards. MIME parameters specified in the Service page markup
+ will be checked and must match exactly, except for MIME-formatted strings
+ with MIME subtype wildcards. MIME parameters which are included in the
+ intent and which are not specified do not impact delivery.
</p><pre> <!ENTITY % Disposition "{window|inline}">
<!ELEMENT INTENT - O EMPTY -- a Web Intents registration →
@@ -841,6 +872,24 @@
</pre>
<p></p>
<p>
+ If the <code>action</code> attribute is missing, the intent Service is
+ assumed to handle display of the provided type(s) in that attribute.
+ </p>
+ <p>
+ If the <code>type</code> attribute is missing, the intent Service is
+ assumed to be registered specifically for a <code>text/plain</code> type.
+ </p>
+ <p>
+ If the <code>href</code> attribute is missing, the intent Service is
+ assumed to be registering for the URL of the page on which the tag is found.
+ (That is, "this page.")
+ </p>
+ <p>
+ If the <code>title</code> attribute is missing, the User Agent <em class="rfc2119" title="should">should</em>
+ utilize the title of the registered Service page to guide the user-visible
+ indicator of that Service during Selection.
+ </p>
+ <p>
The <code>disposition</code> attribute allows a service to choose which
context to be opened in. The User Agent <em class="rfc2119" title="must not">must not</em> allow the Client page any
ability to change the disposition. The <code>window</code> disposition means
@@ -851,31 +900,61 @@
under the control of the client page.
</p>
<p>
- The User Agent <em class="rfc2119" title="must">must</em> not obey any registration markup which is not
+ <i>This section should not be construed as limiting the ability of the User
+ Agent to manage registration of non-web services. That is, the User Agent
+ may handle intent invocations locally, using extensions, or with
+ third-party system services. This section solely governs how web-app service pages
+ register and unregister with the User Agent.</i>
+ </p>
+ <h4 id="same-origin-registration">Same-origin registration</h4>
+ <p>
+ The User Agent <em class="rfc2119" title="must not">must not</em> obey any registration markup which is not
same-origin. That is, a page may only register <code>href</code> attributes
for other service handlers on its same origin. A page may register itself
- as a Service handler, by leaving this attribute empty.
+ as a Service handler, by leaving the |href| attribute empty.
</p>
<p>
- If the <code>title</code> attribute is missing, the User Agent <em class="rfc2119" title="should">should</em>
- utilize the title of the registered Service page to guide the user-visible
- indicator of that Service during Selection.
+ For cross-page registration, when the |href| attribute points to a different
+ resource, the User Agent <em class="rfc2119" title="should">should</em> interpret intent registrations additively.
+ That is, an intent descriptor from the tag would be added to the registry
+ if it is not present (if the user approves the addition).
</p>
- <p>
- If the <code>action</code> attribute is missing, the intent Service is
- assumed to handle display of the provided type(s) in that attribute.
- </p>
- <p>
- If the <code>type</code> attribute is missing, the intent Service is
- assumed to be registered specifically for a <code>text/plain</code> type.
- </p>
+ <h4 id="unregistering">Unregistering</h4>
<p>
The User Agent <em class="rfc2119" title="should">should</em> treat any registration markup which has both
<code>action</code> and <code>type</code> attributes missing as if the
- markup specified no intent capability on the page. That is, a page may
- unregister itself quietly by removing the tag altogether, or explicitly
- by keeping the tag present, but empty.
+ markup specified no intent capability on the |href| page. That is, a page may
+ unregister itself quietly by removing all intent tags, or explicitly
+ by keeping the tag present, but empty. This explicit unregistration <em class="rfc2119" title="should">should</em>
+ be supported for same-origin pages as well.
</p>
+ <p>
+ The intent tags on the service handler page itself <em class="rfc2119" title="should">should</em> be interpreted by
+ the User Agent as authoritative. That is, if the User Agent loads a service
+ page, and sees that not all intent descriptors it believes will be handled
+ by the page are actually handled, it would replace the currently-registered
+ set with the new set declared by the page.
+ </p>
+ <h4 id="http-error-codes-on-service-pages">HTTP Error Codes on Service Pages</h4>
+ <p>
+ If a registered service page is retrieved and has a non-20x error code
+ [<cite><a class="bibref" rel="biblioentry" href="#bib-HTTP11">HTTP11</a></cite>], the User Agent <em class="rfc2119" title="should">should</em> take the following actions:</p>
+ <p>
+ 30x: redirect to the indicated page. If the page is on-domain, and has
+ intent markup, the intent will be re-delivered. If the redirect is permanent
+ (301), the User Agent <em class="rfc2119" title="may">may</em> update its service registration records to reflect
+ that.
+ </p>
+ <p>
+ 40x: indicate to the user that the page cannot be loaded, along with any
+ remediation capabilities (i.e. authentication for 403 or payments for 402).
+ In the case of error 410, the User Agent <em class="rfc2119" title="should">should</em> unregister the handler from
+ its internal registry.
+ </p>
+ <p>
+ 50x: indicate to the user that the page cannot be loaded.
+ </p>
+ <p></p>
</div>
</div>
@@ -900,7 +979,7 @@
The User Agent <em class="rfc2119" title="may">may</em> provide additional mechanisms for web intents service
registration. For example, by external applications, through a separate
API, as a result of a permissions bundle in a downloaded web application,
- or pre-bundled.
+ or pre-bundled. (TODO: add example of a local network service)
</p>
<p>
For intents invoked by client web applications, the User Agent <em class="rfc2119" title="must">must</em>
@@ -1088,6 +1167,6 @@
<div id="references" class="appendix section"><!--OddPage--><h2><span class="secno">B. </span>References</h2><div id="normative-references" class="section"><h3><span class="secno">B.1 </span>Normative references</h3><dl class="bibliography"><dt id="bib-BLOB">[BLOB]</dt><dd>Arun Ranganathan. <a href="http://www.w3.org/TR/2009/WD-FileAPI-20091117/#dfn-Blob"><cite>Blob.</cite></a> 17 November 2009. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/2009/WD-FileAPI-20091117/">http://www.w3.org/TR/2009/WD-FileAPI-20091117/#dfn-Blob</a>
</dd><dt id="bib-HTML5">[HTML5]</dt><dd>Ian Hickson; David Hyatt. <a href="http://www.w3.org/TR/html5"><cite>HTML5.</cite></a> 25 May 2011. W3C Working Draft. (Work in progress.) URL: <a href="http://www.w3.org/TR/html5">http://www.w3.org/TR/html5</a>
+</dd><dt id="bib-HTTP11">[HTTP11]</dt><dd>R. Fielding; et al. <a href="http://www.ietf.org/rfc/rfc2616.txt"><cite>Hypertext Transfer Protocol - HTTP/1.1.</cite></a> June 1999. Internet RFC 2616. URL: <a href="http://www.ietf.org/rfc/rfc2616.txt">http://www.ietf.org/rfc/rfc2616.txt</a>
</dd><dt id="bib-RFC2046">[RFC2046]</dt><dd>N. Freed; N. Borenstein. <a href="http://www.ietf.org/rfc/rfc2046.txt"><cite>Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types.</cite></a> November 1996. Internet RFC 2046. URL: <a href="http://www.ietf.org/rfc/rfc2046.txt">http://www.ietf.org/rfc/rfc2046.txt</a>
</dd></dl></div><div id="informative-references" class="section"><h3><span class="secno">B.2 </span>Informative references</h3><p>No informative references.</p></div></div></body></html>
-