From 999f9a981681065423051264b9c2a959348fb7ae Mon Sep 17 00:00:00 2001 From: diekus Date: Thu, 15 Apr 2021 15:19:53 +0100 Subject: [PATCH 01/25] adds protocol_handlers member Adds protocol_handlers member and protocolHandlerItem. --- index.html | 184 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) diff --git a/index.html b/index.html index 39655bff2..6eb99fda2 100644 --- a/index.html +++ b/index.html @@ -189,6 +189,8 @@

  • [=manifest/prefer_related_applications=]
  • +
  • [=manifest/protocol_handlers=] +
  • [=manifest/related_applications=]
  • [=manifest/scope=] @@ -1004,6 +1006,112 @@

    conventions or limitations of the host operating system.

    +
    +

    `protocol_handlers` member

    +

    + + The [=manifest's=] protocol_handlers member is an array of + ProtocolHandlerItems that allows a web application to handle + URL protocols. +

    +

    + Protocol handlers could, for instance, be used for web app + communication where one app directly invokes another and passes data + via custom protocol links. +

    +

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

    +

    + The steps for processing the protocol_handlers + member are given by the following algorithm. The algorithm + takes a sequence<ProtocolHandlerItem> + protocol_handlers and a URL manifest + URL. This algorithm returns a sequence<ProtocolHandlerItem>. +

    +
      +
    1. Let processedProtocolHandlers be a new Array object + created as if by the expression []. +
    2. +
    3. For each protocol_handler (ProtocolHandlerItem) + in the sequence: +
        +
      1. If protocol_handler["protocol"] or + protocol_handler["url"] are undefined, return failure and [=iteration/continue=]. +
      2. +
      3. Set protocol_handler["url"] to the result of [=URL + Parser|parsing=] protocol_handler["url"] using + manifest URL as the base URL. If the result is + failure, [=iteration/continue=]. +
      4. +
      5. If protocol_handler["url"] is not [=manifest/within + scope=] of manifest URL, return failure and [=iteration/continue=]. +
      6. +
      7. If protocol_handler["url"] already exists in + processedProtocolHandlers, return failure and [=iteration/continue=]. +
      8. +
      9. + Append protocol_handler to + processedProtocolHandlers. +
      10. +
      +
    4. +
    5. Return processedProtocolHandlers. +
    6. +
    +

    + To process the the processedProtocolHandlers the user + agent SHOULD [=register a handler=] per item defined in the + [=sequence=]. +

    +

    + A user agent SHOULD ask users for permission before registering a + ProtocolHandlerItem protocol_handlers as the + default handler for a protocol with the host operating system. A user + agent MAY truncate the list of ProtocolHandlerItem + protocol_handlers presented in order to remain consistent + with the conventions or limitations of the host operating system. +

    +
    +

    + In the following example, the developer has included two + ProtocolHandlerItem protocol_handlers. Assuming + the the manifest's URL is + https://example.com/manifest.webmanifest: +

    +
      +
    • The first protocol handler would register to handle "web+music" + URLs (e.g.: web+music://#1234). When activated, the user agent + would instantiate a new top-level browsing context and + navigate to + https://example.com/play?songId=web+music://%231234. +
    • +
    • The second protocol handler would be ignored, as the protocol + provided does not start with "web+" and is not part of the + safelist. +
    • +
    +
    +            {
    +              "protocol_handlers": [
    +                {
    +                  "protocol": "web+music",
    +                  "url": "/play?songId=%s"
    +                },
    +                {
    +                  "protocol": "store",
    +                  "url": "/buy?songId=%s"
    +                }
    +              ]
    +            }
    +          
    +
    +

    Manifest life-cycle @@ -1755,6 +1863,82 @@

    +
    +

    + ProtocolHandler items +

    +

    Each ProtocolHandlerItem is an [=object=] that represents represents a protocol that the web application wants to handle. It has the following members:

    +
      +
    • [=`protocol`=]
    • +
    • [=`url`=]
    • +
    +

    + 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 + Handling a protocol launch. +

    +

    + [[HTML]]'s registerProtocolHandler method allows web sites + to register themselves as possible handlers for particular protocols. + What constitutes valid protocol and url + values for ProtocolHandlerItems is defined in that API. Also + note that the [[HTML]] API uses scheme where we use + protocol but the same restrictions apply. +

    +
    +

    `protocol` member

    +

    + The protocol member of a ProtocolHandlerItem is a + string that represents the protocol to be handled, such as + "mailto" or "web+auth". +

    +

    + The protocol member of a ProtocolHandlerItem is + equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s + scheme argument defined in [[HTML]], and is processed in + the same manner. +

    +
    +
    +

    `url` member

    +

    + The url member of a ProtocolHandlerItem is the + URL [=manifest/within scope=] of the application that opens when the associated protocol is + activated. +

    +

    + The url member of a ProtocolHandlerItem is equivalent + to {{NavigatorContentUtils/registerProtocolHandler()}}'s + url argument defined in [[HTML]], and is processed in + the same manner. +

    +
    +
    +

    + Handling a protocol launch +

    +

    + When a ProtocolHandlerItem protocol_handler having + [=manifest=] manifest is invoked, run the + following steps: +

    +
      +
    1. Let url be protocol_handler.url. +
    2. +
    3. Replace the first occurrence of the exact literal string "%s" in + url with an escaped version of the absolute URL. +
    4. +
    5. Let browsing context be the result of creating a new + top-level browsing context. +
    6. +
    7. + Navigate browsing context to url. +
    8. +
    +
    +
    +

    External application resource From da610bd566aaa5e698fbf03d0c086ebb68d39887 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 26 Apr 2021 10:29:48 +0100 Subject: [PATCH 02/25] Update index.mhtml (adds protocol_handlers) Adds protocol_handlers member to manifest file. --- index.html | 106 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 42 deletions(-) diff --git a/index.html b/index.html index 6eb99fda2..ee0a1fdb5 100644 --- a/index.html +++ b/index.html @@ -1007,13 +1007,14 @@

    -

    `protocol_handlers` member

    +

    + `protocol_handlers` member +

    - The [=manifest's=] protocol_handlers member is an array of - ProtocolHandlerItems that allows a web application to handle - URL protocols. + "manifest">protocol_handlers member is an array + of ProtocolHandlerItems that allows a web application to + handle URL protocols.

    Protocol handlers could, for instance, be used for web app @@ -1042,18 +1043,21 @@

    `protocol_handlers` member

    in the sequence:
    1. If protocol_handler["protocol"] or - protocol_handler["url"] are undefined, return failure and [=iteration/continue=]. + protocol_handler["url"] are undefined, return failure + and [=iteration/continue=].
    2. Set protocol_handler["url"] to the result of [=URL Parser|parsing=] protocol_handler["url"] using manifest URL as the base URL. If the result is failure, [=iteration/continue=].
    3. -
    4. If protocol_handler["url"] is not [=manifest/within - scope=] of manifest URL, return failure and [=iteration/continue=]. +
    5. If protocol_handler["url"] is not + [=manifest/within scope=] of manifest URL, return + failure and [=iteration/continue=].
    6. If protocol_handler["url"] already exists in - processedProtocolHandlers, return failure and [=iteration/continue=]. + processedProtocolHandlers, return failure and + [=iteration/continue=].
    7. Append protocol_handler to @@ -1867,27 +1871,36 @@

      ProtocolHandler items

      -

      Each ProtocolHandlerItem is an [=object=] that represents represents a protocol that the web application wants to handle. It has the following members:

      +

      + Each ProtocolHandlerItem is an [=object=] that represents + represents a protocol that the web application wants to handle. It has + the following members: +

        -
      • [=`protocol`=]
      • -
      • [=`url`=]
      • +
      • [=`protocol`=] +
      • +
      • [=`url`=] +

      - 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 - Handling a protocol launch. + 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 Handling a protocol + launch.

      [[HTML]]'s registerProtocolHandler method allows web sites to register themselves as possible handlers for particular protocols. What constitutes valid protocol and url values for ProtocolHandlerItems is defined in that API. Also - note that the [[HTML]] API uses scheme where we use - protocol but the same restrictions apply. + note that the [[HTML]] API uses scheme + where we use protocol but the same restrictions apply.

      -

      `protocol` member

      +

      + `protocol` member +

      The protocol member of a ProtocolHandlerItem is a string that represents the protocol to be handled, such as @@ -1896,22 +1909,23 @@

      `protocol` member

      The protocol member of a ProtocolHandlerItem is equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s - scheme argument defined in [[HTML]], and is processed in - the same manner. + scheme + argument defined in [[HTML]].

      -

      `url` member

      +

      + `url` member +

      The url member of a ProtocolHandlerItem is the - URL [=manifest/within scope=] of the application that opens when the associated protocol is - activated. + URL [=manifest/within scope=] of the application that opens + when the associated protocol is activated.

      The url member of a ProtocolHandlerItem is equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s - url argument defined in [[HTML]], and is processed in - the same manner. + url argument defined in [[HTML]].

      @@ -1920,25 +1934,33 @@

      When a ProtocolHandlerItem protocol_handler having - [=manifest=] manifest is invoked, run the - following steps: + [=manifest=] manifest is invoked, it goes through the same + steps used to [=invoke a protocol handler=] defined in [=HTML=], + where the user agent SHOULD navigate to [=url=] and the appropriate + browsing context is set to a new top level browsing context.

      -
        -
      1. Let url be protocol_handler.url. -
      2. -
      3. Replace the first occurrence of the exact literal string "%s" in - url with an escaped version of the absolute URL. -
      4. -
      5. Let browsing context be the result of creating a new - top-level browsing context. -
      6. -
      7. - Navigate browsing context to url. -
      8. -
      +
      +

      + Privacy and Security considerations +

      +

      + Privacy concerns for custom scheme handling are detailed in the + + Security and privacy section of + {{NavigatorContentUtils/registerProtocolHandler()}}. +

      +
      +

      + The user agent MUST ask for permission when using a protocol + handler for the first time. This feature requires user interaction + and a script cannot communicate with another application on its + own. +

      +
      - +

    External application resource From 8664c017c9a86572c7bb73ae08abfab6d3a7f835 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 26 Apr 2021 12:40:00 +0100 Subject: [PATCH 03/25] update index.htmlo -removes return statements that exited the loop while processing protocol_handlers. --- index.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index ee0a1fdb5..2ec952b65 100644 --- a/index.html +++ b/index.html @@ -1043,8 +1043,7 @@

    in the sequence:
    1. If protocol_handler["protocol"] or - protocol_handler["url"] are undefined, return failure - and [=iteration/continue=]. + protocol_handler["url"] are undefined, [=iteration/continue=].
    2. Set protocol_handler["url"] to the result of [=URL Parser|parsing=] protocol_handler["url"] using @@ -1052,12 +1051,10 @@

      failure, [=iteration/continue=].

    3. If protocol_handler["url"] is not - [=manifest/within scope=] of manifest URL, return - failure and [=iteration/continue=]. + [=manifest/within scope=] of manifest URL, [=iteration/continue=].
    4. If protocol_handler["url"] already exists in - processedProtocolHandlers, return failure and - [=iteration/continue=]. + processedProtocolHandlers, [=iteration/continue=].
    5. Append protocol_handler to @@ -1070,7 +1067,7 @@

    To process the the processedProtocolHandlers the user - agent SHOULD [=register a handler=] per item defined in the + agent SHOULD [=register a protocol handler=] per item defined in the [=sequence=].

    From 228e2e6bcd02f956fba4d069f4b7968f1d82323c Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 26 Apr 2021 12:47:00 +0100 Subject: [PATCH 04/25] Update index.html - Adds for each to its infra definition. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 2ec952b65..2051c97bb 100644 --- a/index.html +++ b/index.html @@ -1039,7 +1039,7 @@

  • Let processedProtocolHandlers be a new Array object created as if by the expression [].
  • -
  • For each protocol_handler (ProtocolHandlerItem) +
  • For each protocol_handler (ProtocolHandlerItem) in the sequence:
    1. If protocol_handler["protocol"] or From e1b678f45392c0dc3f6cb0ba860a274310117e17 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Fri, 7 May 2021 12:23:52 +0100 Subject: [PATCH 05/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 2051c97bb..26fd14d85 100644 --- a/index.html +++ b/index.html @@ -1027,7 +1027,7 @@

      system.

      - The steps for processing the protocol_handlers + The steps for processing the `protocol_handlers` member are given by the following algorithm. The algorithm takes a sequence<ProtocolHandlerItem> From 81bdeda983da67ad1e4163c10ff858b1e3c9f4c8 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Fri, 7 May 2021 12:25:39 +0100 Subject: [PATCH 06/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 26fd14d85..fcc96e02e 100644 --- a/index.html +++ b/index.html @@ -1042,7 +1042,7 @@

    2. For each protocol_handler (ProtocolHandlerItem) in the sequence:
        -
      1. If protocol_handler["protocol"] or +
      2. If |protocol_handler|["protocol"] or protocol_handler["url"] are undefined, [=iteration/continue=].
      3. Set protocol_handler["url"] to the result of [=URL From 2c023efce84480f6eef4042fee52a5eabb7d363d Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Fri, 7 May 2021 14:29:20 +0100 Subject: [PATCH 07/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index fcc96e02e..c1611b96a 100644 --- a/index.html +++ b/index.html @@ -1043,7 +1043,7 @@

        in the sequence:
        1. If |protocol_handler|["protocol"] or - protocol_handler["url"] are undefined, [=iteration/continue=]. + protocol_handler["url"] is undefined, [=iteration/continue=].
        2. Set protocol_handler["url"] to the result of [=URL Parser|parsing=] protocol_handler["url"] using From 61780a4ae445ddec1162cddaf80950bffd4c3bda Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 17 May 2021 18:46:02 +0100 Subject: [PATCH 08/25] updates to protocol_handlers updates spec to remove traces of the old WebIDL ways. --- index.html | 51 ++++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 31 deletions(-) diff --git a/index.html b/index.html index 2051c97bb..118fa1cba 100644 --- a/index.html +++ b/index.html @@ -1013,7 +1013,7 @@

          The [=manifest's=] protocol_handlers member is an array - of ProtocolHandlerItems that allows a web application to + of protocol handler descriptions that allows a web application to handle URL protocols.

          @@ -1026,28 +1026,18 @@

          to the user, is at the discretion of the user agent and/or operating system.

          -

          - The steps for processing the protocol_handlers - member are given by the following algorithm. The algorithm - takes a sequence<ProtocolHandlerItem> - protocol_handlers and a URL manifest - URL. This algorithm returns a sequence<ProtocolHandlerItem>. -

          +

          To process the `protocol_handlers` member, given [=object=] |json:JSON|, |manifest:ordered map|, and |manifest URL:URL|:

            -
          1. Let processedProtocolHandlers be a new Array object - created as if by the expression []. +
          2. Let processedProtocolHandlers be a new [=list=].
          3. -
          4. For each protocol_handler (ProtocolHandlerItem) - in the sequence: +
          5. [=list/For each=] protocol_handler (protocol handler description):
            1. If protocol_handler["protocol"] or protocol_handler["url"] are undefined, [=iteration/continue=].
            2. Set protocol_handler["url"] to the result of [=URL Parser|parsing=] protocol_handler["url"] using - manifest URL as the base URL. If the result is + manifest URL as the base URL. If the result is failure, [=iteration/continue=].
            3. If protocol_handler["url"] is not @@ -1057,7 +1047,7 @@

              processedProtocolHandlers, [=iteration/continue=].

            4. - Append protocol_handler to + [=List/Append=] |protocol_handler| to processedProtocolHandlers.
            @@ -1072,16 +1062,16 @@

            A user agent SHOULD ask users for permission before registering a - ProtocolHandlerItem protocol_handlers as the + protocol handler description protocol_handlers as the default handler for a protocol with the host operating system. A user - agent MAY truncate the list of ProtocolHandlerItem + agent MAY truncate the list of protocol handler description protocol_handlers presented in order to remain consistent with the conventions or limitations of the host operating system.

            -
            +
            +

  • @@ -1869,7 +1859,7 @@

    ProtocolHandler items

    - Each ProtocolHandlerItem is an [=object=] that represents + Each protocol handler description is an [=object=] that represents represents a protocol that the web application wants to handle. It has the following members:

    @@ -1889,9 +1879,8 @@

    [[HTML]]'s registerProtocolHandler method allows web sites to register themselves as possible handlers for particular protocols. What constitutes valid protocol and url - values for ProtocolHandlerItems is defined in that API. Also - note that the [[HTML]] API uses scheme + values for protocol handler descriptions is defined in that API. Also + note that the [[HTML]] API uses [=url/scheme=] where we use protocol but the same restrictions apply.

    @@ -1899,12 +1888,12 @@

    `protocol` member

    - The protocol member of a ProtocolHandlerItem is a + The protocol member of a protocol handler description is a string that represents the protocol to be handled, such as - "mailto" or "web+auth". + `mailto` or `web+auth`.

    - The protocol member of a ProtocolHandlerItem is + The protocol member of a protocol handler description is equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s scheme argument defined in [[HTML]]. @@ -1915,12 +1904,12 @@

    `url` member

    - The url member of a ProtocolHandlerItem is the + The url member of a protocol handler description is the URL [=manifest/within scope=] of the application that opens when the associated protocol is activated.

    - The url member of a ProtocolHandlerItem is equivalent + The url member of a protocol handler description is equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s url argument defined in [[HTML]].

    @@ -1930,7 +1919,7 @@

    Handling a protocol launch

    - When a ProtocolHandlerItem protocol_handler having + When a protocol handler description protocol_handler having [=manifest=] manifest is invoked, it goes through the same steps used to [=invoke a protocol handler=] defined in [=HTML=], where the user agent SHOULD navigate to [=url=] and the appropriate From 9314353b12f8e3bfcca9b3205da717b2aa3959d2 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 17 May 2021 20:46:27 +0100 Subject: [PATCH 09/25] Update index.html --- index.html | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 365daee5b..746b686e5 100644 --- a/index.html +++ b/index.html @@ -1932,19 +1932,16 @@

    Privacy concerns for custom scheme handling are detailed in the - + Security and privacy section of {{NavigatorContentUtils/registerProtocolHandler()}}.

    -
    -

    - The user agent MUST ask for permission when using a protocol - handler for the first time. This feature requires user interaction - and a script cannot communicate with another application on its - own. -

    -
    +

    + The user agent MUST ask for permission when using a protocol + handler for the first time. This feature requires user interaction + and a script cannot communicate with another application on its + own. +

    From 264ab23c2d58ee0a7d31e2162585750f22f9a5c6 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Tue, 18 May 2021 09:58:02 +0100 Subject: [PATCH 10/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 746b686e5..ebd231011 100644 --- a/index.html +++ b/index.html @@ -1872,7 +1872,7 @@

    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 Handling a protocol + handler URL, the user agent SHOULD run handling a protocol launch.

    From b0112753bf82461784edacea433bcb6370d25e85 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Tue, 18 May 2021 09:58:16 +0100 Subject: [PATCH 11/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index ebd231011..d77652e4a 100644 --- a/index.html +++ b/index.html @@ -1895,8 +1895,7 @@

    The protocol member of a protocol handler description is equivalent to {{NavigatorContentUtils/registerProtocolHandler()}}'s - scheme - argument defined in [[HTML]]. + |scheme| argument defined in [[HTML]].

    From 1dcffe3f719c41869696de590bfc39b5df9109ea Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Tue, 18 May 2021 09:58:32 +0100 Subject: [PATCH 12/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d77652e4a..e5ad3cc96 100644 --- a/index.html +++ b/index.html @@ -1876,7 +1876,7 @@

    launch.

    - [[HTML]]'s registerProtocolHandler method allows web sites + [[HTML]]'s {{NavigatorContentUtils/registerProtocolHandler()}} allows web sites to register themselves as possible handlers for particular protocols. What constitutes valid protocol and url values for protocol handler descriptions is defined in that API. Also From 0d4f273327168949ccac432ef7ed7ff8885a831d Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Mon, 24 May 2021 13:59:37 +0100 Subject: [PATCH 13/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index e5ad3cc96..d6bc0e84e 100644 --- a/index.html +++ b/index.html @@ -1931,8 +1931,7 @@

    Privacy concerns for custom scheme handling are detailed in the - - Security and privacy section of + Security and privacy section of {{NavigatorContentUtils/registerProtocolHandler()}}.

    From f0945d49f765cdee2d75928de11c8d90e146db74 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Mon, 24 May 2021 14:02:39 +0100 Subject: [PATCH 14/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.html b/index.html index d6bc0e84e..582004255 100644 --- a/index.html +++ b/index.html @@ -1011,8 +1011,7 @@

    `protocol_handlers` member

    - The [=manifest's=] protocol_handlers member is an array + The [=manifest's=] protocol_handlers member is an array of protocol handler descriptions that allows a web application to handle URL protocols.

    From 003c2b1b09f0853dffeeea42968b86d70e641418 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Mon, 24 May 2021 14:03:58 +0100 Subject: [PATCH 15/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 582004255..8e0f31cdf 100644 --- a/index.html +++ b/index.html @@ -1015,7 +1015,7 @@

    of protocol handler descriptions that allows a web application to handle URL protocols.

    -

    +

    Protocol handlers could, for instance, be used for web app communication where one app directly invokes another and passes data via custom protocol links. From 34d479b20b191a0b445eb44eb3d6679ac2582454 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Mon, 24 May 2021 14:16:44 +0100 Subject: [PATCH 16/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 8e0f31cdf..f92cb36c5 100644 --- a/index.html +++ b/index.html @@ -1051,14 +1051,10 @@

  • -
  • Return processedProtocolHandlers. -
  • - -

    - To process the the processedProtocolHandlers the user - agent SHOULD [=register a protocol handler=] per item defined in the - [=sequence=]. -

    +
  • + [=list/For each=] |processedProtocolHandlers|, [=register a protocol handler=]. +
  • +

    A user agent SHOULD ask users for permission before registering a protocol handler description protocol_handlers as the From d440080ab4bd3ae67e52c43ca9851e9277a8617e Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 24 May 2021 20:00:43 +0100 Subject: [PATCH 17/25] Update index.html --- index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f92cb36c5..eb5936285 100644 --- a/index.html +++ b/index.html @@ -1191,8 +1191,11 @@

    |manifest|, |manifest URL|, and "icons".
  • [=Process the `orientation` member=] passing |json|, - |manifest|. -
  • + |manifest|. + +
  • [=Process the `protocol_handlers` member=] passing |json|, + |manifest|, and |manifest URL|. +
  • [=Process the `related_applications` member=] passing |json| and |manifest|.
  • From 94811fb904ef81b684c9a7e1a790c9b138b500a0 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 24 May 2021 20:01:43 +0100 Subject: [PATCH 18/25] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index eb5936285..0ec6b133a 100644 --- a/index.html +++ b/index.html @@ -1857,7 +1857,7 @@

    ProtocolHandler items

    - Each protocol handler description is an [=object=] that represents + Each protocol handler description is an [=object=] that represents a protocol that the web application wants to handle. It has the following members:

    From f1458843b1b969ce141fc8766e6d32a891d849c6 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Tue, 25 May 2021 11:49:48 +0100 Subject: [PATCH 19/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0ec6b133a..d4dbdb2d7 100644 --- a/index.html +++ b/index.html @@ -1079,7 +1079,7 @@

  • The second protocol handler would be ignored, as the protocol provided does not start with "web+" and is not part of the - safelist. + [=safelist=].
  • 
    From 18c9046eb6dea351a52c049073183b9beff24c58 Mon Sep 17 00:00:00 2001
    From: diekus 
    Date: Mon, 7 Jun 2021 21:49:16 +0100
    Subject: [PATCH 20/25] Update index.html
    
    added a tighter normalization protocol_handler manifest items to follow exactly rph()
    ---
     index.html | 11 ++++-------
     1 file changed, 4 insertions(+), 7 deletions(-)
    
    diff --git a/index.html b/index.html
    index d4dbdb2d7..3c785a162 100644
    --- a/index.html
    +++ b/index.html
    @@ -1032,17 +1032,14 @@ 

  • [=list/For each=] protocol_handler (protocol handler description):
    1. If |protocol_handler|["protocol"] or - protocol_handler["url"] is undefined, [=iteration/continue=]. + protocol_handler["url"] is undefined, [=iteration/continue=].
    2. -
    3. Set protocol_handler["url"] to the result of [=URL - Parser|parsing=] protocol_handler["url"] using - manifest URL as the base URL. If the result is - failure, [=iteration/continue=]. +
    4. Let (normalizedProtocol, normalizedUrl) be the result of running normalize protocol handler parameters with protocol_handler["protocol"], protocol_handler["url"] using manifest URL as the base URL, and [=this=]'s relevant [=environment settings object=]. If the result is failure, [=iteration/continue=].
    5. -
    6. If protocol_handler["url"] is not +
    7. If [=normalizedUrl=] is not [=manifest/within scope=] of manifest URL, [=iteration/continue=].
    8. -
    9. If protocol_handler["url"] already exists in +
    10. If [=normalizedUrl=] already exists in processedProtocolHandlers, [=iteration/continue=].
    11. From 257358947d70513819f5214a3b19ca514ab55330 Mon Sep 17 00:00:00 2001 From: Diego Gonzalez <73939538+diekus@users.noreply.github.com> Date: Tue, 15 Jun 2021 14:38:50 +0100 Subject: [PATCH 21/25] Update index.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marcos Cáceres --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 938bc3cf4..c495b9683 100644 --- a/index.html +++ b/index.html @@ -1034,7 +1034,7 @@

    12. If |protocol_handler|["protocol"] or protocol_handler["url"] is undefined, [=iteration/continue=].
    13. -
    14. Let (normalizedProtocol, normalizedUrl) be the result of running normalize protocol handler parameters with protocol_handler["protocol"], protocol_handler["url"] using manifest URL as the base URL, and [=this=]'s relevant [=environment settings object=]. If the result is failure, [=iteration/continue=].
    15. +
    16. Let (normalizedProtocol, normalizedUrl) be the result of running [=normalize protocol handler parameters=] with protocol_handler["protocol"], protocol_handler["url"] using manifest URL as the base URL, and [=this=]'s relevant [=environment settings object=]. If the result is failure, [=iteration/continue=].
    17. If [=normalizedUrl=] is not [=manifest/within scope=] of manifest URL, [=iteration/continue=]. From 2b4ba13898cd9ca556a7ce69acf26c843cb28159 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 5 Jul 2021 15:13:17 +0100 Subject: [PATCH 22/25] Run tidy run tidy on manifest draft --- index.html | 2335 +++++++++++++++++++++++----------------------------- 1 file changed, 1035 insertions(+), 1300 deletions(-) diff --git a/index.html b/index.html index 68d21f403..e2ad8bca4 100644 --- a/index.html +++ b/index.html @@ -5,8 +5,7 @@ Web Application Manifest - + +

      Acknowledgements

      - This document reuses text from the [[HTML]] specification, as permitted - by the license of that specification. + This document reuses text from the [[HTML]] specification, as permitted by the license of + that specification.

      - Dave Raggett and Dominique Hazael-Massieux contributed to this - specification via the HTML5Apps project. + Dave Raggett and Dominique Hazael-Massieux contributed to this specification via the + HTML5Apps project.

      Claudio Gomboli for icon example images.

      - Indiana University Bloomington security researchers have contributed to - this specification by reporting potential risks related to out-of-scope - navigation. + Indiana University Bloomington security researchers have contributed to this specification + by reporting potential risks related to out-of-scope navigation.

      From c0341852929cfde33a60bcec94b2308fa799d1f5 Mon Sep 17 00:00:00 2001 From: diekus Date: Mon, 5 Jul 2021 15:22:11 +0100 Subject: [PATCH 23/25] run tidy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runs tidy with the correct tidy config file 👀👀 --- index.html | 2315 +++++++++++++++++++++++++++++----------------------- 1 file changed, 1299 insertions(+), 1016 deletions(-) diff --git a/index.html b/index.html index e2ad8bca4..e0c9cca58 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,8 @@ Web Application Manifest - + +

      Acknowledgements

      - This document reuses text from the [[HTML]] specification, as permitted by the license of - that specification. + This document reuses text from the [[HTML]] specification, as permitted + by the license of that specification.

      - Dave Raggett and Dominique Hazael-Massieux contributed to this specification via the - HTML5Apps project. + Dave Raggett and Dominique Hazael-Massieux contributed to this + specification via the HTML5Apps project.

      Claudio Gomboli for icon example images.

      - Indiana University Bloomington security researchers have contributed to this specification - by reporting potential risks related to out-of-scope navigation. + Indiana University Bloomington security researchers have contributed to + this specification by reporting potential risks related to out-of-scope + navigation.

      From 73f38128d3fb7484d72d470dc33a7f79bf6a1fbe Mon Sep 17 00:00:00 2001 From: diekus Date: Tue, 13 Jul 2021 20:58:11 +0100 Subject: [PATCH 24/25] Update index.html adds definition of safelisted schemes --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index e0c9cca58..b5f56fd59 100644 --- a/index.html +++ b/index.html @@ -1091,7 +1091,7 @@

    18. The second protocol handler would be ignored, as the protocol provided does not start with "web+" and is not part of the - [=safelist=]. + [=safelisted schemes=].
    19. 
      From 6de904e684c744e8b4a7b9a339ea14d324b1d702 Mon Sep 17 00:00:00 2001
      From: diekus 
      Date: Mon, 2 Aug 2021 20:06:23 +0100
      Subject: [PATCH 25/25] Fixes index.html
      
      - fixes orphan ul element
      - moves protocol handler privacy and security section to main P&S section
      ---
       index.html | 116 ++++++++++++++++++++++++++---------------------------
       1 file changed, 58 insertions(+), 58 deletions(-)
      
      diff --git a/index.html b/index.html
      index bc52f53db..353a30e19 100644
      --- a/index.html
      +++ b/index.html
      @@ -1034,7 +1034,11 @@ 

      URL:URL|:

        -
      1. Let processedProtocolHandlers be a new [=list=]. +
      2. Let processedProtocolHandlers be a new [=list=] of + |json:JSON|["protocol_handlers"]. +
      3. +
      4. Set manifest["protocol_handlers"] to + processedProtocolHandlers.
      5. [=list/For each=] protocol_handler (protocol handler description): @@ -1050,51 +1054,50 @@

        the base URL, and [=this=]'s relevant [=environment settings object=]. If the result is failure, [=iteration/continue=].

      6. +
      7. If [=normalizedUrl=] is not [=manifest/within scope=] of + manifest URL, [=iteration/continue=]. +
      8. +
      9. If [=normalizedUrl=] already exists in + processedProtocolHandlers, [=iteration/continue=]. +
      10. +
      11. [=List/Append=] |protocol_handler| to + processedProtocolHandlers. +
      -
    20. If [=normalizedUrl=] is not [=manifest/within scope=] of - manifest URL, [=iteration/continue=]. -
    21. -
    22. If [=normalizedUrl=] already exists in - processedProtocolHandlers, [=iteration/continue=]. -
    23. -
    24. [=List/Append=] |protocol_handler| to - processedProtocolHandlers. +
    25. [=list/For each=] |processedProtocolHandlers|, the user agent + SHOULD [=register a protocol handler=].
    -
      -
    • [=list/For each=] |processedProtocolHandlers|, [=register a - protocol handler=]. -
    • +

      + A user agent SHOULD ask users for permission before registering a + protocol handler description protocol_handlers as + the default handler for a protocol with the host operating system. A + user agent MAY truncate the list of protocol handler + description protocol_handlers presented in order to + remain consistent with the conventions or limitations of the host + operating system. +

      +
    +

    @@ -1944,21 +1946,6 @@

    new top level browsing context.

    -
    -

    - Privacy and Security considerations -

    -

    - Privacy concerns for custom scheme handling are detailed in the - Security and privacy section of - {{NavigatorContentUtils/registerProtocolHandler()}}. -

    -

    - The user agent MUST ask for permission when using a protocol handler - for the first time. This feature requires user interaction and a - script cannot communicate with another application on its own. -

    -

    @@ -2135,6 +2122,12 @@

    and again as an example, the user agent could install the web application into a list of bookmarks within the user agent itself.

    +
    +

    + When a web application is installed, a user agent MAY [=register a + protocol handler=]. +

    +

    Application's name @@ -2601,7 +2594,6 @@

    -
                 const standalone = matchMedia( '(display-mode: standalone)' );
     
                 standalone.onchange = (e) => {
    @@ -2726,6 +2718,14 @@ 

    exploit the fact that an application is being displayed in fullscreen to mimic the user interface of another application.

    +

    + Privacy concerns for custom scheme handling are detailed in the + Security and privacy section of + {{NavigatorContentUtils/registerProtocolHandler()}}. Before invoking a + protocol handler for the first time, the user agent prompts to request + for permission, there is no communication with another application + beforehand. +