registerContentHandler() clarifications. (whatwg r3124)

registerContentHandler() clarifications. (whatwg r3124)

Diffs for this change per section: 
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2282.html#sample-handler-impl
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2282.html#manually-releasing-the-storage-mutex
http://people.w3.org/mike/diffs/html5/spec/Overview.1.2282.html#dom-navigator-registercontenthandler

http://people.w3.org/mike/diffs/html5/spec/Overview.diff.html
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2281&r2=1.2282&f=h
http://html5.org/tools/web-apps-tracker?from=3123&to=3124

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2281
retrieving revision 1.2282
diff -u -d -r1.2281 -r1.2282
--- Overview.html 25 May 2009 01:27:08 -0000 1.2281
+++ Overview.html 25 May 2009 02:35:01 -0000 1.2282
@@ -43976,8 +43976,9 @@
   interface. UAs could also simply silently collect the information,
   providing it only when relevant to the user.</p>
 
-  <p>There is <a href="#sample-handler-impl">an example of how these
-  methods could be presented to the user</a> below.</p>
+  <p>User agents should keep track of which sites have registered
+  handlers (even if the user has declined such registrations) so that
+  the user is not repeatedly prompted with the same request.</p>
 
   <p>The arguments to the methods have the following meanings and
   corresponding implementation requirements:</p>
@@ -43996,6 +43997,9 @@
     (as in "<code>ftp:</code>"), will never match anything, since
     schemes don't contain colons.</p>
 
+    <p class="note">This feature is not intended to be used with
+    non-standard protocols.</p>
+
    </dd>
 
    <dt><var title="">mimeType</var> (<code title="dom-navigator-registerContentHandler"><a href="#dom-navigator-registercontenthandler">registerContentHandler()</a></code> only)</dt>
@@ -44015,6 +44019,10 @@
     whitespace, or include MIME parameters, then the handler being
     registered will never be used.</p>
 
+    <p class="note">The type is compared to the MIME type used by the
+    user agent <em>after</em> the sniffing algorithms have been
+    applied.</p>
+
    </dd>
 
 
@@ -44199,14 +44207,17 @@
   <p>The <code title="dom-navigator-registerProtocolHandler"><a href="#dom-navigator-registerprotocolhandler">registerProtocolHandler()</a></code>
   method could display a modal dialog box:</p>
 
-  <pre>||[ Protocol Handler Registration ]|||||||||||||||||||||||||||
+  <pre>||[ Content Handler Registration ]||||||||||||||||||||||||||||
 |                                                            |
 | This Web page:                                             |
 |                                                            |
 |    Kittens at work                                         |
 |    http://kittens.example.org/                             |
 |                                                            |
-| ...would like permission to handle the protocol "x-meow:"  |
+| ...would like permission to handle files of type:          |
+|                                                            |
+|    application/x-meowmeow                                  |
+|                                                            |
 | using the following Web-based application:                 |
 |                                                            |
 |    Kittens-at-work displayer                               |
@@ -44220,8 +44231,8 @@
 
   <p>...where "Kittens at work" is the title of the page that invoked
   the method, "http://kittens.example.org/" is the URL of that page,
-  "x-meow" is the string that was passed to the <code title="dom-navigator-registerProtocolHandler"><a href="#dom-navigator-registerprotocolhandler">registerProtocolHandler()</a></code>
-  method as its first argument (<var title="">protocol</var>),
+  "application/x-meowmeow" is the string that was passed to the <code title="dom-navigator-registerContentHandler"><a href="#dom-navigator-registercontenthandler">registerContentHandler()</a></code>
+  method as its first argument (<var title="">mimeType</var>),
   "http://kittens.example.org/?show=%s" was the second argument (<var title="">url</var>), and "Kittens-at-work displayer" was the third
   argument (<var title="">title</var>).</p>
 
@@ -44230,13 +44241,15 @@
   remembered.</p>
 
   <p>When the user then attempts to fetch a URL that uses the
-  "x-meow:" scheme, then it might display a dialog as follows:</p>
+  "application/x-meowmeow" MIME type, then it might display a dialog
+  as follows:</p>
 
-  <pre>||[ Unknown Protocol ]||||||||||||||||||||||||||||||||||||||||
+  <pre>||[ Unknown File Type ]|||||||||||||||||||||||||||||||||||||||
 |                                                            |
 | You have attempted to access:                              |
 |                                                            |
-|    x-meow:S2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%3D               |
+|    data:application/x-meowmeow;base64,S2l0dGVucyBhcmUgd    |
+|    GhlIGN1dGVzdCE%3D                                       |
 |                                                            |
 | How would you like FerretBrowser to handle this resource?  |
 |                                                            |
@@ -44249,8 +44262,8 @@
 |  ( ) Pass this URL to the "Kittens-at-work displayer"      |
 |      application at "kittens.example.org".                 |
 |                                                            |
-|  [ ] Always do this for resources using the "x-meow"       |
-|      protocol in future.                                   |
+|  [ ] Always do this for resources using the "application/  |
+|      x-meowmeow" protocol in future.                       |
 |                                                            |
 |                                     ( Ok )  (( Cancel ))   |
 |____________________________________________________________|</pre>
@@ -44261,11 +44274,11 @@
   <p>If the user does select that option, then the browser, in
   accordance with the requirements described in the previous two
   sections, will redirect the user to
-  "http://kittens.example.org/?show=x-meow%3AS2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%253D".</p>
+  "http://kittens.example.org/?show=data%3Aapplication/x-meowmeow;base64,S2l0dGVucyBhcmUgdGhlIGN1dGVzdCE%253D".</p>
 
-  <p>The <code title="dom-navigator-registerContentHandler"><a href="#dom-navigator-registercontenthandler">registerContentHandler()</a></code>
-  method would work equivalently, but for unknown MIME types instead
-  of unknown protocols.</p>
+  <p>The <code title="dom-navigator-registerProtocolHandler"><a href="#dom-navigator-registerprotocolhandler">registerProtocolHandler()</a></code>
+  method would work equivalently, but for schemes instead of unknown
+  content types.</p>
 
   </div><h4 id="manually-releasing-the-storage-mutex"><span class="secno">6.8.3 </span>Manually releasing the storage mutex</h4><dl class="domintro"><dt><var title="">window</var> . <code title="dom-navigator"><a href="#dom-navigator">navigator</a></code> . <code title="dom-navigator-getStorageUpdates"><a href="#dom-navigator-getstorageupdates">getStorageUpdates</a></code>()</dt>

Received on Monday, 25 May 2009 02:37:16 UTC