--- a/spec/Overview-respec.html Thu Jun 21 10:51:56 2012 +0200
+++ b/spec/Overview-respec.html Thu Jun 21 10:59:09 2012 +0200
@@ -82,7 +82,7 @@
photo, it can place an <b>Edit</b> button, with this kind of accompanying
code:
</p>
- <pre class="example">
+ <pre class="example highlight">
document.getElementById('edit-photo').addEventListener("click", function() {
var intent = new Intent({"action":"http://webintents.org/edit",
"type":"image/jpeg",
@@ -108,7 +108,7 @@
but by adding a <b>Share</b> button near images, and with this kind of
accompanying code, it can accomplish this integration:
</p>
- <pre class="example">
+ <pre class="example highlight">
document.getElementById('share-photo').addEventListener("click", function() {
var intent = new Intent({"action":"http://webintents.org/share",
"type":"text/uri-list",
@@ -147,7 +147,7 @@
handle the incoming intent data, possibly producing a response. That is
done like this:
</p>
- <pre class="example">
+ <pre class="example highlight">
<html>
<head>
<title>Image Meme Editor</title>
@@ -259,7 +259,7 @@
<dt>sequence<Transferable> transfer</dt>
<dd>The list of Transferables, for use in the structured clone
algorithm.</dd>
- <dt>dictionary extras</dt>
+ <dt>Object extras</dt>
<dd>A key-value map of extra metadata to be sent with the intent. Keys
and values are strings.</dd>
<dt>URL service</dt>
@@ -279,7 +279,7 @@
immutable once created.
</p>
- <dl title='[Constructor(IntentParameters params)<br> Constructor(string action, string type, optional any data, optional sequence&lt;Transferable&gt; transferList) raises DOMException] interface Intent' class='idl'>
+ <dl title='[Constructor(IntentParameters params),<br> Constructor(DOMString action, DOMString type, optional any data, optional sequence&lt;Transferable&gt; transferList)] interface Intent' class='idl'>
<dt>readonly attribute DOMString action</dt>
<dd>This is an opaque string. Chosen strings SHOULD be namespaced by a
URL namespace convention. The string MUST NOT be empty, or the
@@ -297,7 +297,7 @@
page.</b> Any ports used in the |transferList| of the constructor during invocation will be
delivered to the service page in the |ports| attribute. See
[[!POSTMSG]]</dd>
- <dt>string getExtra(DOMString key)</dt>
+ <dt>DOMString getExtra(DOMString key)</dt>
<dd>Retrieves the value (if any) from the extra data dictionary this
intent was constructed with.</dd>
@@ -321,7 +321,7 @@
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 MUST be implemented following the W3C
- Web Messaging spec [[!http://dev.w3.org/html5/postmsg/]].
+ Web Messaging spec [[!POSTMSG]].
</p>
<p>
The User Agent MUST perform the structured clone algorithm on creation
@@ -340,7 +340,7 @@
The user is then able to select which Service should handle the Intent.
</p>
<dl title='[NoInterfaceObject] interface Intents' class='idl'>
- <dt>void startActivity (Intent intent, optional callback onSuccess, optional callback onFailure)</dt>
+ <dt>void startActivity (Intent intent, optional IntentSuccessCallback onSuccess, optional IntentFailureCallback onFailure)</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
@@ -353,7 +353,7 @@
parameter: the data received from the service.
User Agents SHOULD restrict this method to only be successfully callable within the
context of an explicit user gesture.
- An exception SHOULD be thrown if the Intent is invalid (i.e. null), or if
+ An exception SHOULD be thrown if the Intent is invalid (i.e. <code>null</code>), or if
the method is invoked without being the result of an explicit user gesture.
</dd>
</dl>
@@ -365,17 +365,22 @@
<section>
<p>The callbacks passed to startActivity MUST provide these signatures:</p>
- <dl title='[NoInterfaceObject] interface IntentSuccessCallback' class='idl'>
- <dt>void onSuccess (optional any data, optional MessagePort[] ports)</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.
- [[!POSTMSG]]
- </dl>
+ <dl title='callback IntentSuccessCallback = void' class='idl'>
+ <dt>optional any data</dt>
+ <dd>
+ The |data| passed will be the payload data from the structured
+ cloneable object passed to the postResult method of the delivered Intent.
+ </dd>
+ <dt>optional MessagePort[] ports</dt>
+ <dd>
+ The |ports| will be any ports in the payload, as resulting from the structured
+ clone algorithm with Transferables, as in the Web Messaging spec.
+ [[!POSTMSG]]
+ </dd>
+ </dl>
- <dl title='interface IntentFailureCallback' class='idl'>
- <dt>void onFailure (optional any data)
+ <dl title='callback IntentFailureCallback = void' class='idl'>
+ <dt>optional any data</dt>
<dd>The |data| passed will be the payload data passed to the postFailure
method of the delivered Intent.</dd>
</dl>
@@ -401,11 +406,11 @@
This object will only be made available to Service pages when they are
loaded in the context of an intent invocation. Even if the same URL is
loaded in other situations, the User Agent MUST NOT make
- <code>Window</code> implement <code>IntentProvider</code>. Similarly, if
+ <code>Window</code> implement <a>IntentProvider</a>. Similarly, if
a Service page is registered, but the User Agent loads it and it does not
contain the declarative markup marking it as expecting to handle the Intent
the User Agent is delivering, the User Agent MUST NOT make
- <code>Window</code> implement <code>IntentProvider</code>.
+ <code>Window</code> implement <a>IntentProvider</a>.
</p>
<p>
The <code>window.intent</code> object MUST be made available across
@@ -459,28 +464,28 @@
delivery).
</p>
<dl title='interface HTMLIntentElement : HTMLElement' class='idl'>
- <dt>attribute string action</dt>
+ <dt>attribute DOMString action</dt>
<dd>An opaque string indicating the behavior class the service supports.
It is recommended that users use a fully qualified URI.
If the <code>action</code> attribute is missing, the intent Service is
assumed to handle display of the provided type(s) in the <code>type</code>
attributes.</dd>
- <dt>attribute string type</dt>
+ <dt>attribute DOMString type</dt>
<dd>A string specifying the type of payload data the service can
accept. Must be a space separated list of type specifiers. If these parse
as MIME types, or the MIME wildcard types "*/*" or "*", they will be
interpreted as such (see the section on matching action and type for delivery).
If not, they will be interpreted as string literal type specifiers. Empty
type attributes are not valid registrations.</dd>
- <dt>attribute string href</dt>
+ <dt>attribute DOMString href</dt>
<dd>Should be a fully qualified URI. If the <code>href</code> attribute
is missing, the service URI will be set to the URI in which the tag is
found.</dd>
- <dt>attribute string title</dt>
+ <dt>attribute DOMString title</dt>
<dd>A human-readable title which the User Agent SHOULD use to indicate the
service to the user. If the <code>title</code> attribute is missing, the User Agent SHOULD
use the title of the registered Service page as the service title.</dd>
- <dt>attribute string disposition</dt>
+ <dt>attribute DOMString disposition</dt>
<dd>The <code>disposition</code> attribute allows a service to choose which
context to be opened in. The User Agent MUST NOT allow the Client page any
ability to change the disposition. The <code>window</code> disposition means
@@ -695,9 +700,9 @@
the result of a user selection) has a registration record supporting the
action and type of the Intent being delivered by following these steps:
<ol>
- <li>Let <i>intent action</i> be the action field of the invoked
+ <li>Let <var>intent action</var> be the action field of the invoked
intent.</li>
- <li>Let <i>intent type</i> be the type field of the invoked
+ <li>Let <var>intent type</var> be the type field of the invoked
intent.</li>
<li>For every distinguishable registration (that is, having unique
action/type fields) present for the Service page, follow these steps:
@@ -707,29 +712,29 @@
<li>When considering whether a field value is a MIME type, it is
considered so if it parses as a valid MIME type [[!RFC2046]], or is
equal to the MIME wildcard strings "*" or "*/*".</li>
- <li>Let <i>service action</i> be the value of the action field of the
+ <li>Let <var>service action</var> be the value of the action field of the
service registration.</li>
- <li>Let <i>service type</i> be the value of the type field of the
+ <li>Let <var>service type</var> be the value of the type field of the
service registration.</li>
- <li>If the <i>service type</i> or <i>service action</i> is empty,
+ <li>If the <var>service type</var> or <var>service action</var> is empty,
the registration record is invalid. Continue to the next
registration record.</li>
- <li>If the <i>intent action</i> is different from the <i>service
- action</i>, continue to the next registration record.
- <li>If the <i>intent type</i> is a MIME type, and the <i>service
- type</i> is not, continue to the next registration record.
- <li>If the <i>service type</i> is a MIME type, and the <i>intent
- type</i> is not, continue to the next registration record.
- <li>If both <i>service type</i> and <i>action type</i> are MIME types,
+ <li>If the <var>intent action</var> is different from the <var>service
+ action</var>, continue to the next registration record.
+ <li>If the <var>intent type</var> is a MIME type, and the <var>service
+ type</var> is not, continue to the next registration record.
+ <li>If the <var>service type</var> is a MIME type, and the <var>intent
+ type</var> is not, continue to the next registration record.
+ <li>If both <var>service type</var> and <var>action type</var> are MIME types,
then check whether the MIME specifiers overlap. This is true if the
top-level and sublevel types match exactly, or if one or both are represented
by the MIME wild card ("*"). If any MIME parameters are present in the
- <i>service type</i> or the <i>action type</i>, they must be present in
+ <var>service type</var> or the <var>action type</var>, they must be present in
both and match exactly. A MIME parameter present in only one of
- <i>service type</i> and <i>action type</i> does not disqualify the
+ <var>service type</var> and <var>action type</var> does not disqualify the
match. If the MIME types do not overlap, continue fo the next
registration record.</li>
- <li>If neither <i>service type</i> nor <i>action type</i> are MIME types,
+ <li>If neither <var>service type</var> nor <var>action type</var> are MIME types,
then if they are different, continue to the next registration
record.</li>
</ol>