Skip to content
Permalink
Browse files
[e] (0) registerContentHandler() clarifications.
git-svn-id: http://svn.whatwg.org/webapps@3124 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 25, 2009
1 parent 40587a8 commit 8103813ec823395144ba776095d834487ccb991b
Showing 2 changed files with 57 additions and 31 deletions.
43 index
@@ -48944,8 +48944,9 @@ interface <dfn id=function>Function</dfn> {
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>
@@ -48964,6 +48965,9 @@ interface <dfn id=function>Function</dfn> {
(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>
@@ -48983,6 +48987,10 @@ interface <dfn id=function>Function</dfn> {
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>


@@ -49173,14 +49181,17 @@ interface <dfn id=function>Function</dfn> {
<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 |
@@ -49194,8 +49205,8 @@ interface <dfn id=function>Function</dfn> {

<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>

@@ -49204,13 +49215,15 @@ interface <dfn id=function>Function</dfn> {
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? |
| |
@@ -49223,8 +49236,8 @@ interface <dfn id=function>Function</dfn> {
| ( ) 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>
@@ -49235,11 +49248,11 @@ interface <dfn id=function>Function</dfn> {
<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>

45 source
@@ -55827,8 +55827,9 @@ interface <dfn>Function</dfn> {
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>
@@ -55849,6 +55850,9 @@ interface <dfn>Function</dfn> {
(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">registerContentHandler()</code> only)</dt>
@@ -55868,6 +55872,10 @@ interface <dfn>Function</dfn> {
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>


@@ -56078,14 +56086,17 @@ interface <dfn>Function</dfn> {
title="dom-navigator-registerProtocolHandler">registerProtocolHandler()</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 |
@@ -56099,9 +56110,9 @@ interface <dfn>Function</dfn> {

<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">registerProtocolHandler()</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">registerContentHandler()</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>
@@ -56111,13 +56122,15 @@ interface <dfn>Function</dfn> {
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? |
| |
@@ -56130,8 +56143,8 @@ interface <dfn>Function</dfn> {
| ( ) 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>
@@ -56142,12 +56155,12 @@ interface <dfn>Function</dfn> {
<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">registerContentHandler()</code>
method would work equivalently, but for unknown MIME types instead
of unknown protocols.</p>
title="dom-navigator-registerProtocolHandler">registerProtocolHandler()</code>
method would work equivalently, but for schemes instead of unknown
content types.</p>

</div>

0 comments on commit 8103813

Please sign in to comment.