From a9179a1bb603e76400ae736c5865619de8627b6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Sun, 29 Jan 2017 10:41:57 +1100 Subject: [PATCH 01/19] example: update example to reflect modern times. --- index.html | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/index.html b/index.html index ac3b713b..9c162615 100644 --- a/index.html +++ b/index.html @@ -137,9 +137,11 @@

{ "lang": "en", "dir": "ltr", - "name": "Super Racer 3000", - "description": "The ultimate futuristic racing game from the future!", - "short_name": "Racer3K", + "name": "Resistance", + "description": "This app helps you organize against + U.S. government-backed xenophobia. You can use it to protect + human rights.", + "short_name": "Resist", "icons": [{ "src": "icon/lowres.webp", "sizes": "64x64", @@ -182,7 +184,7 @@

 <!doctype>
 <html>
-<title>Super Racer 3000</title>
+<title>Resist Trump</title>
 
 <!-- Startup configuration -->
 <link rel="manifest" href="manifest.webmanifest">
@@ -533,7 +535,7 @@ 

 function handleInstalled(ev) {
   const date = new Date(ev.timeStamp / 1000);
-  console.log(`Yay! Our app got installed at ${date.toTimeString()}`);
+  console.log(`Yay! Our app got installed at ${date.toTimeString()}. Keep resisting.`);
 }
 
 // Using the event handler IDL attribute
@@ -742,7 +744,7 @@ 

- For example, Awesome Browser only supports the + For example, Resistance Browser only supports the minimal-ui and browser display modes, but a developer declares that she wants fullscreen in the manifest. In this case, the user agent will first check if it @@ -1137,7 +1139,7 @@

{ "lang": "en", - "name": "Super Racer 3000", + "name": "Resist", "start_url": "/start.html", "display": "fullscreen", "orientation": "landscape" @@ -1810,17 +1812,17 @@

{ "icons": [ { - "src": "icon/lowres.webp", + "src": "icon/lowres_resist.webp", "sizes": "48x48", "type": "image/webp" },{ - "src": "icon/lowres", + "src": "icon/lowres_resist", "sizes": "48x48" },{ - "src": "icon/hd_hi.ico", + "src": "icon/hd_hi_resist.ico", "sizes": "72x72 96x96 128x128 256x256" },{ - "src": "icon/hd_hi.svg", + "src": "icon/hd_hi_resist.svg", "sizes": "257x257" }] } From 83bfb5b6f1d5512b272fb8347c7433523b8d2c4f Mon Sep 17 00:00:00 2001 From: Marcos Caceres Date: Sun, 29 Jan 2017 10:53:47 +1100 Subject: [PATCH 02/19] fix: respec dfn errors --- index.html | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 9c162615..6388d53d 100644 --- a/index.html +++ b/index.html @@ -2954,9 +2954,9 @@

src member

- The src member of - a serviceworker object is a URL representing a service - worker. + The service worker src + member of a serviceworker object is a URL + representing a service worker.

The steps for processing the src member of a @@ -2996,9 +2996,9 @@

scope member

- The scope - member of a serviceworker object is the service worker's - associated scope URL. + The service worker + scope member of a serviceworker object is + the service worker's associated scope URL.

The steps for processing the scope member of a @@ -3039,8 +3039,8 @@

type member

- The type member - of a serviceworker object is the service worker's service worker type member of a + serviceworker object is the service worker's worker type.

@@ -3086,11 +3086,10 @@

use_cache member

- The use_cache - member of a serviceworker object determines whether the - user agent cache should - be used when fetching the service worker. + The service worker use_cache member of a + serviceworker object determines whether the user agent + cache + should be used when fetching the service worker.

The steps for processing the use_cache member of a From 1df16d73cfe1f780d1a28e08b3c251d120a6e996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Sun, 29 Jan 2017 11:03:46 +1100 Subject: [PATCH 03/19] fix: autopub on master, not gh-pages (#544) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f79379af..b05b494e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: node_js branches: only: - - gh-pages + - master env: global: From 3383ea7a25f11dd222671ba2125500eac408e2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Sun, 29 Jan 2017 11:13:27 +1100 Subject: [PATCH 04/19] meaningless change, trying to get Travis working (#545) --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 6388d53d..acac4167 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + From 2e7ac2379687a6286b8efd34079bc65cfe6bfb4d Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Fri, 22 Sep 2017 12:15:56 +0200 Subject: [PATCH 05/19] Removed six occurrences of superfluous spaces after quotes. --- index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index acac4167..916f93e2 100644 --- a/index.html +++ b/index.html @@ -2584,7 +2584,7 @@

  • Let value be the result of calling the [[\GetOwnProperty]] internal method of image - passing " purpose" as the argument. + passing "purpose" as the argument.
  • Let type be Type(value).
  • @@ -2675,7 +2675,7 @@

  • Let value be the result of calling the [[\GetOwnProperty]] internal method of image - passing " sizes" as the argument. + passing "sizes" as the argument.
  • Let type be Type(value).
  • @@ -2723,7 +2723,7 @@

    1. Let value be the result of calling the [[\GetOwnProperty]] internal method of image - passing " src" as the argument. + passing "src" as the argument.
    2. Let type be Type(value).
    3. @@ -2970,7 +2970,7 @@

      1. Let value be the result of calling the [[\GetOwnProperty]] internal method of registration - passing " src" as the argument. + passing "src" as the argument.
      2. Let type be Type(value).
      3. @@ -3055,7 +3055,7 @@

        1. Let value be the result of calling the [[\GetOwnProperty]] internal method of registration - passing " type" as the argument. + passing "type" as the argument.
        2. Let type be Type(value).
        3. @@ -3102,7 +3102,7 @@

          1. Let value be the result of calling the [[\GetOwnProperty]] internal method of registration - passing " use_cache" as the argument. + passing "use_cache" as the argument.
          2. Let type be Type(value).
          3. From 3e967e0493c9ac2f2dad5f8706810dd3ffeba2f2 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Fri, 14 Jun 2019 14:40:42 -0700 Subject: [PATCH 06/19] Adding shortcuts to the explainer --- explainer.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/explainer.md b/explainer.md index da0e1c5a..e276ed78 100644 --- a/explainer.md +++ b/explainer.md @@ -194,6 +194,62 @@ TBW: using description and screenshots. ## Theme color and background color TBW... +## Adding shortcuts +Numerous operating systems grant native applications the ability to add menu items to the app icon itself. These often provide quick access to key tasks for an app. Typically, these are exposed via a right click, long tap, or a similar context menu-triggering action. For web applications, you can define a set of shortcuts to be exposed when the app is installed. Each shortcut item must have a name and a target URL. You may also include additional information, such as a shorter name, a description for the action, one or more icons, and parameters to be passed along to the target URL. + +```JSON +"shortcuts": [ + { + "name": "Play Later", + "description": "View the list of podcasts you saved for later", + "url": "/play-later", + "icons": [ + { + "src": "/icons/play-later.svg", + "type": "image/svg+xml", + "purpose": "any" + } + ] + }, + { + "name": "Subscriptions", + "description": "View the list of podcasts you listen to", + "url": "/subscriptions", + "icons": [ + { + "src": "/icons/subscriptions.svg", + "type": "image/svg+xml", + "purpose": "any" + } + ] + }, + { + "name": "Search", + "description": "Search for new podcasts to listen to", + "url": "/search", + "icons": [ + { + "src": "/icons/search.svg", + "type": "image/svg+xml", + "purpose": "any" + } + ] + }, + { + "name": "Discover", + "description": "Browse for new podcasts to listen to", + "url": "/discover", + "icons": [ + { + "src": "/icons/discover.svg", + "type": "image/svg+xml", + "purpose": "any" + } + ] + } +] +``` + ## How can I detect if the user "installed" my app? The spec provides a way for you to detect when the user installs your apps by registering for "appinstalled" events. From 5a9e33d2d447e96c6682a0cc546227e012c824fc Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Thu, 20 Jun 2019 12:36:34 -0700 Subject: [PATCH 07/19] Progress on shortcuts spec --- index.html | 253 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 251 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9ac049ab..45368839 100644 --- a/index.html +++ b/index.html @@ -1495,12 +1495,12 @@

            manifest["categories"].
          4. Set manifest["icons"] to the result of running - processing ImageResource members given + processing ImageResource members given manifest["icons"], manifest URL, and "icons".
          5. Set manifest["screenshots"] to the result of - running processing ImageResource members given + running processing ImageResource members given manifest["screenshots"], manifest URL, and "screenshots".
          6. @@ -1513,6 +1513,10 @@

            manifest["serviceworker"], manifest URL, and serviceworker. +
          7. Set manifest["shortcuts"] to the result of running + processing the shortcuts member given manifest URL, and + "shortcuts". +
          8. Extension point: process any proprietary and/or other supported members at this point in the algorithm. @@ -1589,6 +1593,7 @@

            ServiceWorkerRegistrationObject serviceworker; sequence<ExternalApplicationResource> related_applications; boolean prefer_related_applications = "false"; + sequence<ShortcutItem> shortcuts; };

    @@ -2362,6 +2367,93 @@

    can get their games and apps rated with IARC.

    +
    +

    + shortcuts member +

    +

    + The shortcuts member is an array of + ShortcutItems that provide access to key tasks within a web + application. For example, they can be used to link directly to a user’s + timeline within a social media application or their recent orders in an + ecommerce context. +

    +

    + A developer may provide as many shortcuts as they like, but the user + agent and operating system will decide how many are presented to the + user. For this reason, it is recommended that developers order their + shortcuts by priority, with the most critical shortcuts appearing first + in the array. +

    +

    + The steps for processing the shortcuts + member are given by the following algorithm. The algorithm + takes a sequence<ShortcutItem> + shortcuts as an argument. This algorithm + returns an sequence<ShortcutItem>. +

    +

    + A user agent MUST expose shortcuts via interactions that are consistent + with exposure of an application icon’s context menu in the host + operating system (e.g., right click, long press). A user agent MUST + render the shortcuts in the same order as they are provided in the + manifest. A user agent SHOULD represent the shortcuts in a manner + consistent with exposure of an application icon’s context menu in the + host operating system. A user agent MAY truncate the list of shortcuts + presented in order to remain consistent with conventions of the host + operating system. +

    +
    +

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

    +
      +
    • The first shortcut would be displayed with the text "Play Later". + If the operating system supports icons for context menu items and it + also supports SVG images for that purpose, the user agent would + present https://example.com/icons/play-later.svg next to + the text. When launched, the user agent would instantiate a new + top-level browsing context and navigate to + https://example.com/play-later. +
    • +
    • The first shortcut would be displayed with the text + "Subscriptions". When launched, the user agent would instantiate a + new top-level browsing context and navigate to + https://example.com/subscriptions?sort=desc. +
    • +
    +
    +            {
    +              "shortcuts": [
    +                {
    +                  "name": "Play Later",
    +                  "description": "View the list of podcasts you saved for later",
    +                  "url": "/play-later",
    +                  "icons": [
    +                    {
    +                      "src": "/icons/play-later.svg",
    +                      "type": "image/svg+xml",
    +                      "purpose": "any"
    +                    }
    +                  ]
    +                },
    +                {
    +                  "name": "Subscriptions",
    +                  "description": "View the list of podcasts you listen to",
    +                  "url": "/subscriptions",
    +                  "params": {
    +                      "sort": "desc"
    +                  }
    +                }
    +              ]
    +            }
    +          
    +
    +

    @@ -2945,6 +3037,163 @@

    +
    +

    + ShortcutItem and its members +

    +
    +        dictionary ShortcutItem {
    +          required USVString name;
    +          USVString short_name;
    +          USVString description;
    +          required USVString url;
    +          dictionary<RequestParams> params;
    +          sequence<ImageResource> icons;
    +        }
    +      
    +

    + Each ShortcutItem represents a link to a key task or page within + a web app. A user agent can use these values to assemble a context menu + to be displayed by the operating system when a user engages with the + web app’s icon. +

    +
    +

    + name member +

    +

    + The name member of a ShortcutItem is a + string that represents the name of the shortcut as it is + usually displayed to the user in a context menu +

    +
    +
    +

    + short_name member +

    +

    + The short_name member of a ShortcutItem is a + string that represents a short version of the name of the + shortcut. It is intended to be used where there is insufficient space + to display the full name of the shortcut. +

    +
    +
    +

    + description member +

    +

    + The description member of a ShortcutItem is a + string that allows the developer to describe the purpose of + the shortcut. User agents may choose to expose this information to + assistive technology. +

    +
    +
    +

    + url member +

    +

    + The url member of a ShortcutItem is a URL to + which a user agent should navigate when the associated shortcut is + activated. +

    +

    + The steps for processing the url member of a + shortcut are given by the following algorithm. The algorithm + takes a ShortcutItem url, and a manifest + URL, which is the URL from which the manifest + was fetched. This algorithm will return a URL or + undefined. +

    +
      +
    1. Let value be url +
    2. +
    3. If Type(value) it not String, return + undefined. +
    4. +
    5. Otherwise, parse value using manifest + URL as the base URL and return the result. +
    6. +
    +
    +
    +

    + params member +

    +

    + The params member of an ShortcutItem is a + RequestParams object defining the keys and values that should be added to the + url of a shortcut before navigation occurs. +

    +
    +
    +

    + icons member +

    +

    + The icons member of an ShortcutItem member is an + array of ImageResources that can serve as iconic + representations of the shortcut in various contexts. +

    +
    +
    +

    + Launching a shortcut +

    +

    + When ShortcutItem shortcut having + WebAppManifest manifest is invoked, run the + following steps: +

    +
      +
    1. Let url be a copy of shortcut.url. +
    2. +
    3. Let header list be a new empty header list. +
    4. +
    5. If shortcut.params: +
        +
      1. Let query be the result of running the + application/x-www-form-urlencoded serializer with + shortcut.params +
      2. +
      3. Set url's query component to query.
      4. +
      +
    6. +
    7. + Append "Content-Type"/"application/x-www-form-urlencoded" to + header list. +
    8. +
    +
      +
    • Let body be null. +
    • +
    • Let browsing context be the result of creating a + new top-level browsing context. +
    • +
    • + Navigate browsing context to a new request + whose url is url, header list is header list, + and body is body. +
    • +
    +
    +
    +
    +

    + RequestParams +

    +

    + Each RequestParams dictionary represents data to be passed along + with a request. +

    +

    + The RequestParams dictionary contains a series of + keys and values. Each key must be a + valid USVString. Each value must be a valid boolean, + dictionary, sequence, or USVString. +

    +

    Multi-purpose members From a885c6717c5e1f939702e911b16d459e4dfa8131 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Thu, 20 Jun 2019 12:46:26 -0700 Subject: [PATCH 08/19] Fixing a Respec issue with ImageResource --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 45368839..ffcab0ee 100644 --- a/index.html +++ b/index.html @@ -2496,8 +2496,8 @@

    To fetch the image associated with an ImageResource, the user agent MUST run the steps to fetch an image resource. The algorithm takes an image URL - (ImageResource.src), the manifest URL, and the - document ({{code}}ode>) from which the manifest was + (src), the manifest URL, and the + document ({{code}}) from which the manifest was linked. It returns a Response:

      From 863a4175b07da39888889f5454c3e5cd0ba08b34 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Thu, 20 Jun 2019 13:00:18 -0700 Subject: [PATCH 09/19] Addressing the last of the Respec errrs --- index.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index ffcab0ee..c969e1d7 100644 --- a/index.html +++ b/index.html @@ -3047,9 +3047,9 @@

      USVString short_name; USVString description; required USVString url; - dictionary<RequestParams> params; + RequestParams params; sequence<ImageResource> icons; - } + };

    Each ShortcutItem represents a link to a key task or page within @@ -3091,10 +3091,10 @@

    - url member + url member

    - The url member of a ShortcutItem is a URL to + The url member of a ShortcutItem is a URL to which a user agent should navigate when the associated shortcut is activated.

    @@ -3102,8 +3102,8 @@

    The steps for processing the url member of a shortcut are given by the following algorithm. The algorithm takes a ShortcutItem url, and a manifest - URL, which is the URL from which the manifest - was fetched. This algorithm will return a URL or + URL, which is the URL from which the manifest + was fetched. This algorithm will return a URL or undefined.

      @@ -3183,6 +3183,10 @@

      RequestParams

      +
      +        dictionary RequestParams {
      +        };
      +      

      Each RequestParams dictionary represents data to be passed along with a request. From 7be9fd29c6f86811de8c71ea2ce89b0c42347d9c Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Thu, 20 Jun 2019 13:06:10 -0700 Subject: [PATCH 10/19] Content tweaks for readability & such --- index.html | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index c969e1d7..83b2f7f7 100644 --- a/index.html +++ b/index.html @@ -3094,7 +3094,7 @@

      url member

      - The url member of a ShortcutItem is a URL to + The url member of a ShortcutItem is a URL to which a user agent should navigate when the associated shortcut is activated.

      @@ -3102,14 +3102,14 @@

      The steps for processing the url member of a shortcut are given by the following algorithm. The algorithm takes a ShortcutItem url, and a manifest - URL, which is the URL from which the manifest - was fetched. This algorithm will return a URL or + URL, which is the URL from which the manifest + was fetched. This algorithm will return a URL or undefined.

      1. Let value be url
      2. -
      3. If Type(value) it not String, return +
      4. If Type(value) it not String, return undefined.
      5. Otherwise, parse value using manifest @@ -3124,7 +3124,7 @@

        The params member of an ShortcutItem is a RequestParams object defining the keys and values that should be added to the - url of a shortcut before navigation occurs. + url of a shortcut before navigation occurs. See also: launching a shortcut.

    @@ -3139,7 +3139,7 @@

    - Launching a shortcut + Launching a shortcut

    When ShortcutItem shortcut having @@ -3164,12 +3164,10 @@

    Append "Content-Type"/"application/x-www-form-urlencoded" to header list. - -
    • Let body be null.
    • Let browsing context be the result of creating a - new top-level browsing context. + new top-level browsing context.
    • Navigate browsing context to a new request From 60703f5dc0abfeb1d22050d0bfb5baa730a86ce7 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Thu, 20 Jun 2019 13:12:01 -0700 Subject: [PATCH 11/19] Tidy --- index.html | 83 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 43 insertions(+), 40 deletions(-) diff --git a/index.html b/index.html index 83b2f7f7..3ed3d3b5 100644 --- a/index.html +++ b/index.html @@ -1513,9 +1513,9 @@

      manifest["serviceworker"], manifest URL, and serviceworker.

    • -
    • Set manifest["shortcuts"] to the result of running - processing the shortcuts member given manifest URL, and - "shortcuts". +
    • Set manifest["shortcuts"] to the result of + running processing the shortcuts member given + manifest URL, and "shortcuts".
    • Extension point: process any proprietary and/or other @@ -2374,36 +2374,36 @@

      The shortcuts member is an array of ShortcutItems that provide access to key tasks within a web - application. For example, they can be used to link directly to a user’s - timeline within a social media application or their recent orders in an - ecommerce context. + application. For example, they can be used to link directly to a + user’s timeline within a social media application or their recent + orders in an ecommerce context.

      A developer may provide as many shortcuts as they like, but the user agent and operating system will decide how many are presented to the user. For this reason, it is recommended that developers order their - shortcuts by priority, with the most critical shortcuts appearing first - in the array. + shortcuts by priority, with the most critical shortcuts appearing + first in the array.

      - The steps for processing the shortcuts - member are given by the following algorithm. The algorithm - takes a processing the shortcuts member + are given by the following algorithm. The algorithm takes a + sequence<ShortcutItem> - shortcuts as an argument. This algorithm - returns an shortcuts as an argument. This algorithm returns an + sequence<ShortcutItem>.

      - A user agent MUST expose shortcuts via interactions that are consistent - with exposure of an application icon’s context menu in the host - operating system (e.g., right click, long press). A user agent MUST - render the shortcuts in the same order as they are provided in the - manifest. A user agent SHOULD represent the shortcuts in a manner + A user agent MUST expose shortcuts via interactions that are + consistent with exposure of an application icon’s context menu in the + host operating system (e.g., right click, long press). A user agent + MUST render the shortcuts in the same order as they are provided in + the manifest. A user agent SHOULD represent the shortcuts in a manner consistent with exposure of an application icon’s context menu in the - host operating system. A user agent MAY truncate the list of shortcuts - presented in order to remain consistent with conventions of the host - operating system. + host operating system. A user agent MAY truncate the list of + shortcuts presented in order to remain consistent with conventions of + the host operating system.

      @@ -2412,11 +2412,12 @@

      https://example.com/manifest.webmanifest:

        -
      • The first shortcut would be displayed with the text "Play Later". - If the operating system supports icons for context menu items and it - also supports SVG images for that purpose, the user agent would - present https://example.com/icons/play-later.svg next to - the text. When launched, the user agent would instantiate a new +
      • The first shortcut would be displayed with the text "Play + Later". If the operating system supports icons for context menu + items and it also supports SVG images for that purpose, the user + agent would present + https://example.com/icons/play-later.svg next to the + text. When launched, the user agent would instantiate a new top-level browsing context and navigate to https://example.com/play-later.
      • @@ -2495,9 +2496,9 @@

        To fetch the image associated with an ImageResource, the user agent MUST run the steps to fetch an image - resource. The algorithm takes an image URL - (src), the manifest URL, and the - document ({{code}}) from which the manifest was + resource. The algorithm takes an image URL (src), the manifest URL, and + the document ({{code}}) from which the manifest was linked. It returns a Response:

          @@ -3122,9 +3123,10 @@

          params member

          - The params member of an ShortcutItem is a - RequestParams object defining the keys and values that should be added to the - url of a shortcut before navigation occurs. See also: launching a shortcut. + The params member of an ShortcutItem is a + RequestParams object defining the keys and values that should + be added to the url of a shortcut before navigation + occurs. See also: launching a shortcut.

    @@ -3149,7 +3151,8 @@

    1. Let url be a copy of shortcut.url.
    2. -
    3. Let header list be a new empty header list. +
    4. Let header list be a new empty header list.
    5. If shortcut.params:
        @@ -3157,24 +3160,24 @@

        application/x-www-form-urlencoded serializer with shortcut.params -
      1. Set url's query component to query.
      2. +
      3. Set url's query component to query. +
    6. -
    7. - Append "Content-Type"/"application/x-www-form-urlencoded" to - header list. +
    8. Append "Content-Type"/"application/x-www-form-urlencoded" to + header list.
    9. Let body be null.
    10. -
    11. Let browsing context be the result of creating a - new top-level browsing context. +
    12. Let browsing context be the result of creating a new + top-level browsing context.
    13. Navigate browsing context to a new request whose url is url, header list is header list, and body is body.
    14. - +

    From 54b7a69b97f68707d6114b00bc48c0ff62baa4d1 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Fri, 21 Jun 2019 10:45:27 -0700 Subject: [PATCH 12/19] Remediations per @kenchris --- index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 3ed3d3b5..eed11e22 100644 --- a/index.html +++ b/index.html @@ -2376,7 +2376,7 @@

    ShortcutItems that provide access to key tasks within a web application. For example, they can be used to link directly to a user’s timeline within a social media application or their recent - orders in an ecommerce context. + orders in an e-commerce context.

    A developer may provide as many shortcuts as they like, but the user @@ -3154,7 +3154,8 @@

  • Let header list be a new empty header list.
  • -
  • If shortcut.params: +
  • If shortcut.params exists:
    1. Let query be the result of running the application/x-www-form-urlencoded serializer with From 87529c3399cf7b1eece3cc242b8a1ef79e2806e7 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Fri, 21 Jun 2019 10:52:45 -0700 Subject: [PATCH 13/19] Adding a note about parsing ShortcutItem icons. --- index.html | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index eed11e22..70b333ec 100644 --- a/index.html +++ b/index.html @@ -1495,12 +1495,12 @@

      manifest["categories"].

    2. Set manifest["icons"] to the result of running - processing ImageResource members given + processing `ImageResource` members given manifest["icons"], manifest URL, and "icons".
    3. Set manifest["screenshots"] to the result of - running processing ImageResource members given + running processing `ImageResource` members given manifest["screenshots"], manifest URL, and "screenshots".
    4. @@ -2392,7 +2392,11 @@

      "WEBIDL#sequence-type">sequence<ShortcutItem> shortcuts as an argument. This algorithm returns an sequence<ShortcutItem>. + "WEBIDL#sequence-type">sequence<ShortcutItem>. For + each shortcut (ShortcutItem) in the sequence, set + shortcut.icons to the result of running processing + `ImageResource` members given shortcut.icons and + manifest URL.

      A user agent MUST expose shortcuts via interactions that are @@ -3154,8 +3158,8 @@

    5. Let header list be a new empty header list.
    6. -
    7. If shortcut.params exists: +
    8. If shortcut.params + exists:
      1. Let query be the result of running the application/x-www-form-urlencoded serializer with From b76a26684982553fe0412056085c8fee62ee4a4f Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Tue, 10 Sep 2019 14:41:40 -0700 Subject: [PATCH 14/19] Changes per @mguica --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 70b333ec..96d08dca 100644 --- a/index.html +++ b/index.html @@ -2375,7 +2375,7 @@

        The shortcuts member is an array of ShortcutItems that provide access to key tasks within a web application. For example, they can be used to link directly to a - user’s timeline within a social media application or their recent + user's timeline within a social media application or their recent orders in an e-commerce context.

        @@ -2399,7 +2399,7 @@

        manifest URL.

        - A user agent MUST expose shortcuts via interactions that are + A user agent SHOULD expose shortcuts via interactions that are consistent with exposure of an application icon’s context menu in the host operating system (e.g., right click, long press). A user agent MUST render the shortcuts in the same order as they are provided in From de5e0dac3e8a9bfee552bbe58ca50e1e26d23e24 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Tue, 10 Sep 2019 14:56:51 -0700 Subject: [PATCH 15/19] More changes per @mguica --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 6198f874..fbb965fe 100644 --- a/index.html +++ b/index.html @@ -2408,7 +2408,7 @@

        A user agent SHOULD expose shortcuts via interactions that are consistent with exposure of an application icon’s context menu in the host operating system (e.g., right click, long press). A user agent - MUST render the shortcuts in the same order as they are provided in + SHOULD render the shortcuts in the same order as they are provided in the manifest. A user agent SHOULD represent the shortcuts in a manner consistent with exposure of an application icon’s context menu in the host operating system. A user agent MAY truncate the list of @@ -3153,7 +3153,7 @@

        following steps:

          -
        1. Let url be a copy of shortcut.url. +
        2. Let url be shortcut.url.
        3. Let header list be a new empty header list. From ab7d68c96f2d5262fbfaa512cd345877d7ad112a Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Tue, 10 Sep 2019 15:02:34 -0700 Subject: [PATCH 16/19] Manual merge from source/master --- index.html | 233 ----------------------------------------------------- 1 file changed, 233 deletions(-) diff --git a/index.html b/index.html index bbddd0fe..c5f8b001 100644 --- a/index.html +++ b/index.html @@ -193,7 +193,6 @@

          The following shows a more typical manifest.

          -<<<<<<< HEAD
                     {
                       "lang": "en",
                       "dir": "ltr",
          @@ -233,44 +232,6 @@ 

          }] }

          -======= -{ - "lang": "en", - "dir": "ltr", - "name": "Resistance", - "description": "This app helps you organize against - U.S. government-backed xenophobia. You can use it to protect - human rights.", - "short_name": "Resist", - "icons": [{ - "src": "icon/lowres.webp", - "sizes": "64x64", - "type": "image/webp" - },{ - "src": "icon/lowres.png", - "sizes": "64x64" - }, { - "src": "icon/hd_hi", - "sizes": "128x128" - }], - "scope": "/racer/", - "start_url": "/racer/start.html", - "display": "fullscreen", - "orientation": "landscape", - "theme_color": "aliceblue", - "background_color": "red", - "screenshots": [{ - "src": "screenshots/in-game-1x.jpg", - "sizes": "640x480", - "type": "image/jpeg" - },{ - "src": "screenshots/in-game-2x.jpg", - "sizes": "1280x920", - "type": "image/jpeg" - }] -} - ->>>>>>> source/master

  • @@ -284,15 +245,9 @@

    fallback name and set of icons.

    -<<<<<<< HEAD
               <!doctype>
               <html>
               <title>Racer 3K</title>
    -=======
    -<!doctype>
    -<html>
    -<title>Resist Trump</title>
    ->>>>>>> source/master
     
               <!-- Startup configuration -->
               <link rel="manifest" href="manifest.webmanifest">
    @@ -809,25 +764,12 @@ 

    attribute EventHandler onbeforeinstallprompt; };

    -<<<<<<< HEAD
               function handleInstalled(ev) {
                 const date = new Date(ev.timeStamp / 1000);
                 console.log(`Yay! Our app got installed at ${date.toTimeString()}.`);
               }
    -=======
    -        
    -

    - This example shows two ways of handling the "appinstalled" - event. -

    -
    -function handleInstalled(ev) {
    -  const date = new Date(ev.timeStamp / 1000);
    -  console.log(`Yay! Our app got installed at ${date.toTimeString()}. Keep resisting.`);
    -}
    ->>>>>>> source/master
     
               // Using the event handler IDL attribute
               window.onappinstalled = handleInstalled;
    @@ -1040,17 +982,10 @@ 

    -<<<<<<< HEAD For example, SuperSecure Browser (a fictitious browser) only supports the minimal-ui and browser display modes, but a developer declares that she wants fullscreen in the manifest. In this case, the user agent will first check if it -======= - For example, Resistance Browser only supports the - minimal-ui and browser display modes, but a - developer declares that she wants fullscreen in the - manifest. In this case, the user agent will first check if it ->>>>>>> source/master supports fullscreen (it doesn't), so it falls back to standalone (which it also doesn't support), and ultimately falls back to minimal-ui. @@ -1431,30 +1366,6 @@

  • Return manifest and manifest URL.
  • -<<<<<<< HEAD -======= -
    -

    - Authors are encouraged to use the HTTP cache directives to - explicitly cache the manifest. For example, the following response - would cause a cached manifest to be used 30 days from the time the - response is sent: -

    -
    -HTTP/1.1 200 OK
    -Cache-Control: max-age=2592000
    -Content-Type: application/manifest+json
    -
    -{
    -  "lang": "en",
    -  "name": "Resist",
    -  "start_url": "/start.html",
    -  "display": "fullscreen",
    -  "orientation": "landscape"
    -}
    -
    -
    ->>>>>>> source/master

    Content security policy @@ -1962,7 +1873,6 @@

    individually tailored for small display sizes. -<<<<<<< HEAD
                 {
                   "icons": [
    @@ -1982,27 +1892,6 @@ 

    }] }

    -======= -
    -{
    -  "icons": [
    -      {
    -        "src": "icon/lowres_resist.webp",
    -        "sizes": "48x48",
    -        "type": "image/webp"
    -      },{
    -        "src": "icon/lowres_resist",
    -        "sizes": "48x48"
    -      },{
    -        "src": "icon/hd_hi_resist.ico",
    -        "sizes": "72x72 96x96 128x128 256x256"
    -      },{
    -        "src": "icon/hd_hi_resist.svg",
    -        "sizes": "257x257"
    -      }]
    - }
    -
    ->>>>>>> source/master

    @@ -2770,14 +2659,8 @@

    |image|["purpose"] consists solely of [=ascii whitespace=], then return the [=set=] « "any" ». -<<<<<<< HEAD
  • Let |keywords:list<string>| be the result of [=split on ASCII whitespace=] |image|["purpose"]. -======= -
  • Let value be the result of calling the - [[\GetOwnProperty]] internal method of image - passing "purpose" as the argument. ->>>>>>> source/master
  • If |keywords| is empty, then return the [=set=] « "any" ».
  • @@ -3003,15 +2886,7 @@

    a set.

      -<<<<<<< HEAD
    1. Let set be an empty set. -======= -
    2. Let sizes be an empty set. -
    3. -
    4. Let value be the result of calling the - [[\GetOwnProperty]] internal method of image - passing "sizes" as the argument. ->>>>>>> source/master
    5. Let value be image.sizes.
    6. @@ -3052,15 +2927,7 @@

      URL or undefined.

        -<<<<<<< HEAD
      1. Let value be image["src"]. -======= -
      2. Let value be the result of calling the - [[\GetOwnProperty]] internal method of image - passing "src" as the argument. -
      3. -
      4. Let type be Type(value). ->>>>>>> source/master
      5. If Type(value) it not String, return undefined. @@ -3399,14 +3266,8 @@

        src member

        -<<<<<<< HEAD The src member of a ServiceWorkerRegistrationObject dictionary is a URL representing a service worker. -======= - The service worker src - member of a serviceworker object is a URL - representing a service worker. ->>>>>>> source/master

        The steps for processing the src member of a @@ -3417,17 +3278,9 @@

        a URL or undefined.

          -<<<<<<< HEAD
        1. If Type(source URL) is not String or source URL is the empty string, then return undefined. -======= -
        2. Let value be the result of calling the - [[\GetOwnProperty]] internal method of registration - passing "src" as the argument. -
        3. -
        4. Let type be Type(value). ->>>>>>> source/master
        5. Otherwise, parse source URL using manifest URL as the base URL and return the result. @@ -3440,14 +3293,8 @@

          scope member

          -<<<<<<< HEAD The scope member of a ServiceWorkerRegistrationObject dictionary is the service worker's associated scope URL. -======= - The service worker - scope member of a serviceworker object is - the service worker's associated scope URL. ->>>>>>> source/master

          The steps for processing the scope member of a @@ -3471,55 +3318,11 @@

          type member

          -<<<<<<< HEAD The type member of a ServiceWorkerRegistrationObject dictionary is the service worker's {{WorkerType}}. The possible values are those of the WorkerType enum defined in [[HTML]].

          -======= - The service worker type member of a - serviceworker object is the service worker's worker - type. -

          -

          - The steps for processing the type member of a - service worker are given by the following algorithm. The - algorithm takes a serviceworker object - registration, and a URL manifest URL, - which is the URL from which the manifest was - fetched. This algorithm will return a string. -

          -
            -
          1. Let value be the result of calling the - [[\GetOwnProperty]] internal method of registration - passing "type" as the argument. -
          2. -
          3. Let type be Type(value). -
          4. -
          5. If type is not "string", then: -
              -
            1. If type is not "undefined", issue a - developer warning that the type is unsupported and return - undefined. -
            2. -
            3. Return "classic". -
            4. -
            -
          6. -
          7. If Trim(value) is the empty string, then: -
              -
            1. Issue a developer warning that the type is unsupported. -
            2. -
            3. Return undefined. -
            4. -
            -
          8. -
          9. Otherwise, Trim(value) and return the result. -
          10. -
          ->>>>>>> source/master

    @@ -3527,7 +3330,6 @@

    update_via_cache member

    -<<<<<<< HEAD The update_via_cache member of a ServiceWorkerRegistrationObject dictionary determines the update via @@ -3535,41 +3337,6 @@

    of the ServiceWorkerUpdateViaCache enum defined in [[SERVICE-WORKERS-1]].

    -======= - The service worker use_cache member of a - serviceworker object determines whether the user agent - cache - should be used when fetching the service worker. -

    -

    - The steps for processing the use_cache member of a - service worker are given by the following algorithm. The - algorithm takes a serviceworker object - registration, and a URL manifest URL, - which is the URL from which the manifest was - fetched. This algorithm will return a boolean. -

    -
      -
    1. Let value be the result of calling the - [[\GetOwnProperty]] internal method of registration - passing "use_cache" as the argument. -
    2. -
    3. Let type be Type(value). -
    4. -
    5. If type is not "boolean", then: -
        -
      1. If type is not "undefined", issue a - developer warning that the type is unsupported and return - undefined. -
      2. -
      3. Otherwise, return false -
      4. -
      -
    6. -
    7. Otherwise, return value. -
    8. -
    ->>>>>>> source/master

    Date: Mon, 16 Sep 2019 11:26:02 +0900 Subject: [PATCH 17/19] Removing RequestParams/shortcut.params --- index.html | 55 +----------------------------------------------------- 1 file changed, 1 insertion(+), 54 deletions(-) diff --git a/index.html b/index.html index c5f8b001..de505c83 100644 --- a/index.html +++ b/index.html @@ -2455,10 +2455,7 @@

    { "name": "Subscriptions", "description": "View the list of podcasts you listen to", - "url": "/subscriptions", - "params": { - "sort": "desc" - } + "url": "/subscriptions" } ] } @@ -3052,7 +3049,6 @@

    USVString short_name; USVString description; required USVString url; - RequestParams params; sequence<ImageResource> icons; }; @@ -3122,17 +3118,6 @@

    -
    -

    - params member -

    -

    - The params member of an ShortcutItem is a - RequestParams object defining the keys and values that should - be added to the url of a shortcut before navigation - occurs. See also: launching a shortcut. -

    -

    icons member @@ -3155,25 +3140,6 @@

    1. Let url be shortcut.url.
    2. -
    3. Let header list be a new empty header list. -
    4. -
    5. If shortcut.params - exists: -
        -
      1. Let query be the result of running the - application/x-www-form-urlencoded serializer with - shortcut.params -
      2. -
      3. Set url's query component to query. -
      4. -
      -
    6. -
    7. Append "Content-Type"/"application/x-www-form-urlencoded" to - header list. -
    8. -
    9. Let body be null. -
    10. Let browsing context be the result of creating a new top-level browsing context.
    11. @@ -3185,25 +3151,6 @@

    -
    -

    - RequestParams -

    -
    -        dictionary RequestParams {
    -        };
    -      
    -

    - Each RequestParams dictionary represents data to be passed along - with a request. -

    -

    - The RequestParams dictionary contains a series of - keys and values. Each key must be a - valid USVString. Each value must be a valid boolean, - dictionary, sequence, or USVString. -

    -

    Multi-purpose members From 41d88f3efd4c9dc2aa377efb3fe482e98c5e137b Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Sat, 2 Nov 2019 21:01:08 -0700 Subject: [PATCH 18/19] =?UTF-8?q?Resolves=20@mgiuca=E2=80=99s=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .travis.yml | 2 +- explainer.md | 2 +- index.html | 37 ++++++++++--------------------------- 3 files changed, 12 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index f304f4dc..224dda0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ node_js: branches: only: - - master + - gh-pages env: global: diff --git a/explainer.md b/explainer.md index e276ed78..106b4c83 100644 --- a/explainer.md +++ b/explainer.md @@ -195,7 +195,7 @@ TBW: using description and screenshots. TBW... ## Adding shortcuts -Numerous operating systems grant native applications the ability to add menu items to the app icon itself. These often provide quick access to key tasks for an app. Typically, these are exposed via a right click, long tap, or a similar context menu-triggering action. For web applications, you can define a set of shortcuts to be exposed when the app is installed. Each shortcut item must have a name and a target URL. You may also include additional information, such as a shorter name, a description for the action, one or more icons, and parameters to be passed along to the target URL. +Numerous operating systems grant native applications the ability to add menu items to the app icon itself. These often provide quick access to key tasks for an app. Typically, these are exposed via a right click, long tap, or a similar context menu-triggering action. For web applications, you can define a set of shortcuts to be exposed when the app is installed. Each shortcut item must have a name and a target URL. You may also include additional information, such as a shorter name, a description for the action, and one or more icons. ```JSON "shortcuts": [ diff --git a/index.html b/index.html index de505c83..59a726ce 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -2402,15 +2402,18 @@

    each shortcut (ShortcutItem) in the sequence, set shortcut.icons to the result of running processing `ImageResource` members given shortcut.icons and - manifest URL. + manifest URL. For each shortcut + (ShortcutItem) in the sequence, parse + shortcut["url"] using manifest URL as + the base URL.

    A user agent SHOULD expose shortcuts via interactions that are - consistent with exposure of an application icon’s context menu in the + consistent with exposure of an application icon's context menu in the host operating system (e.g., right click, long press). A user agent SHOULD render the shortcuts in the same order as they are provided in the manifest. A user agent SHOULD represent the shortcuts in a manner - consistent with exposure of an application icon’s context menu in the + consistent with exposure of an application icon's context menu in the host operating system. A user agent MAY truncate the list of shortcuts presented in order to remain consistent with conventions of the host operating system. @@ -2455,7 +2458,7 @@

    { "name": "Subscriptions", "description": "View the list of podcasts you listen to", - "url": "/subscriptions" + "url": "/subscriptions?sort=desc" } ] } @@ -3056,7 +3059,7 @@

    Each ShortcutItem represents a link to a key task or page within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the - web app’s icon. + web app's icon.

    @@ -3099,24 +3102,6 @@

    which a user agent should navigate when the associated shortcut is activated.

    -

    - The steps for processing the url member of a - shortcut are given by the following algorithm. The algorithm - takes a ShortcutItem url, and a manifest - URL, which is the URL from which the manifest - was fetched. This algorithm will return a URL or - undefined. -

    -
      -
    1. Let value be url -
    2. -
    3. If Type(value) it not String, return - undefined. -
    4. -
    5. Otherwise, parse value using manifest - URL as the base URL and return the result. -
    6. -

    @@ -3144,9 +3129,7 @@

    top-level browsing context.
  • - Navigate browsing context to a new request - whose url is url, header list is header list, - and body is body. + Navigate browsing context to url.
  • From 4120edf1f8939faf0a35c3e019ce26d1335e368a Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Mon, 4 Nov 2019 09:57:47 -0800 Subject: [PATCH 19/19] =?UTF-8?q?Resolves=20@mgiuca=E2=80=99s=20remaining?= =?UTF-8?q?=20change=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/index.html b/index.html index 59a726ce..c4ae35c7 100644 --- a/index.html +++ b/index.html @@ -2380,16 +2380,20 @@

    The shortcuts member is an array of ShortcutItems that provide access to key tasks within a web - application. For example, they can be used to link directly to a - user's timeline within a social media application or their recent - orders in an e-commerce context. + application. +

    +

    + Shortcuts could, for instance, be used to link directly to a user's + timeline within a social media application or to their recent orders + in an e-commerce context.

    - A developer may provide as many shortcuts as they like, but the user - agent and operating system will decide how many are presented to the - user. For this reason, it is recommended that developers order their - shortcuts by priority, with the most critical shortcuts appearing - first in the array. + How shortcuts are presented, and how many of them are shown to the + user, is at the discretion of the user agent and/or operating system. +

    +

    + Developers are encouraged to order their shortcuts by priority, with + the most critical shortcuts appearing first in the array.

    The steps for processing the shortcuts member @@ -2415,8 +2419,8 @@

    the manifest. A user agent SHOULD represent the shortcuts in a manner consistent with exposure of an application icon's context menu in the host operating system. A user agent MAY truncate the list of - shortcuts presented in order to remain consistent with conventions of - the host operating system. + shortcuts presented in order to remain consistent with the + conventions or limitations of the host operating system.

    @@ -3059,7 +3063,8 @@

    Each ShortcutItem represents a link to a key task or page within a web app. A user agent can use these values to assemble a context menu to be displayed by the operating system when a user engages with the - web app's icon. + web app's icon. When the user invokes a shortcut from the operating + system menu, the user agent SHOULD run Launching a shortcut.

    @@ -3068,7 +3073,7 @@

    The name member of a ShortcutItem is a string that represents the name of the shortcut as it is - usually displayed to the user in a context menu + usually displayed to the user in a context menu.

    @@ -3089,8 +3094,8 @@

    The description member of a ShortcutItem is a string that allows the developer to describe the purpose of - the shortcut. User agents may choose to expose this information to - assistive technology. + the shortcut. User agents MAY expose this information to assistive + technology.

    @@ -3098,9 +3103,8 @@

    url member

    - The url member of a ShortcutItem is a URL to - which a user agent should navigate when the associated shortcut is - activated. + The url member of a ShortcutItem is the URL + that opens when the associated shortcut is activated.