Re: [w3c/manifest] Adding protocol handlers (#972)

@marcoscaceres requested changes on this pull request.



> +          The [=manifest's=] <code><dfn data-export="" data-dfn-for=
+          "manifest">protocol_handlers</dfn></code> member is an <a>array</a>

Don't export until someone asks for it. 

```suggestion
          The [=manifest's=] <code><dfn  data-dfn-for="manifest">protocol_handlers</dfn></code> member is an <a>array</a>
```

> +          <li>Return <var>processedProtocolHandlers</var>.
+          </li>
+        </ol>
+        <p>
+          To process the the <var>processedProtocolHandlers</var> the user
+          agent SHOULD [=register a protocol handler=] per item defined in the
+          [=sequence=].
+        </p>

```suggestion
          <li>
           [=list/For each=]  |processedProtocolHandlers|, [=register a protocol handler=].
         </li>
      </ol>
```

Note that the above doesn't quite match what HTML expects. 

> @@ -1004,6 +1006,103 @@ <h3>
           conventions or limitations of the host operating system.
         </p>
       </section>
+      <section>
+        <h3>
+          `protocol_handlers` member
+        </h3>
+        <p>
+          The [=manifest's=] <code><dfn data-export="" data-dfn-for=
+          "manifest">protocol_handlers</dfn></code> member is an <a>array</a>
+          of <a>protocol handler description</a>s that allows a web application to
+          handle URL protocols.
+        </p>
+        <p class="note">

This sounds like an example... 

```suggestion
        <p class="example">
```

Given that we have the example below, do we need this one? Could we combine them?

> +        the following members:
+      </p>
+      <ul>
+        <li>[=`protocol`=]
+        </li>
+        <li>[=`url`=]
+        </li>
+      </ul>
+      <p>
+        A user agent SHOULD use these values to register the web application as
+        a handler with the operating system. When the user activates a protocol
+        handler URL, the user agent SHOULD run <a>Handling a protocol
+        launch</a>.
+      </p>
+      <p class="note">
+        [[HTML]]'s <code>registerProtocolHandler</code> method allows web sites

```suggestion
        [[HTML]]'s {{NavigatorContentUtils/registerProtocolHandler()}} allows web sites
```

> +        represents a protocol that the web application wants to handle. It has
+        the following members:
+      </p>
+      <ul>
+        <li>[=`protocol`=]
+        </li>
+        <li>[=`url`=]
+        </li>
+      </ul>
+      <p>
+        A user agent SHOULD use these values to register the web application as
+        a handler with the operating system. When the user activates a protocol
+        handler URL, the user agent SHOULD run <a>Handling a protocol
+        launch</a>.
+      </p>
+      <p class="note">

Do we need to talk about `.registerProtocolHandler()` at all? The API is not really relevant here? 

> +      </h2>
+      <p>
+        Each <dfn>protocol handler description</dfn> is an [=object=] that represents
+        represents a protocol that the web application wants to handle. It has
+        the following members:
+      </p>
+      <ul>
+        <li>[=`protocol`=]
+        </li>
+        <li>[=`url`=]
+        </li>
+      </ul>
+      <p>
+        A user agent SHOULD use these values to register the web application as
+        a handler with the operating system. When the user activates a protocol
+        handler URL, the user agent SHOULD run <a>Handling a protocol

```suggestion
        handler URL, the user agent SHOULD run <a>handling a protocol
```

> +          <a href="https://url.spec.whatwg.org/#concept-url-scheme">scheme</a>
+          argument defined in [[HTML]].

```suggestion
          |scheme| argument defined in [[HTML]].
```

> +          The [=manifest's=] <code><dfn data-export="" data-dfn-for=
+          "manifest">protocol_handlers</dfn></code> member is an <a>array</a>
+          of <a>protocol handler description</a>s that allows a web application to
+          handle URL protocols.
+        </p>
+        <p class="note">
+          Protocol handlers could, for instance, be used for web app
+          communication where one app directly invokes another and passes data
+          via custom protocol links.
+        </p>
+        <p>
+          How protocol handlers are presented, and how many of them are shown
+          to the user, is at the discretion of the user agent and/or operating
+          system.
+        </p>
+        <p>To <dfn>process the `protocol_handlers` member</dfn>, given [=object=] |json:JSON|, |manifest:ordered map|, and |manifest URL:URL|:</p>

The main processing steps should call into this. 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/972#pullrequestreview-661774791

Received on Tuesday, 18 May 2021 08:41:36 UTC