From 8923ba484dc5aebc8cf4f8327bf3f964fc73965f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20C=C3=A1ceres?= Date: Fri, 15 Nov 2019 18:08:59 +1100 Subject: [PATCH] BREAKING CHANGE: remove serviceworker member (#825) --- index.html | 223 +---------------------------------------------------- 1 file changed, 1 insertion(+), 222 deletions(-) diff --git a/index.html b/index.html index 8c981e6a8..eda50fdd9 100644 --- a/index.html +++ b/index.html @@ -129,7 +129,7 @@ } - +

This specification defines a JSON-based manifest file that provides @@ -222,11 +222,6 @@

"orientation": "landscape", "theme_color": "aliceblue", "background_color": "red", - "serviceworker": - "src": "sw.js", - "scope": "/racer/", - "update_via_cache": "none" - }, "screenshots": [{ "src": "screenshots/in-game-1x.jpg", "sizes": "640x480", @@ -386,12 +381,6 @@

  • Let manifest be the manifest value created during steps to determine installability of the document.
  • -
  • If |manifest|.{{WebAppManifest/serviceworker}} is not - undefined, the user agent MAY run the steps for - registering a manifest's service worker with - |manifest|.{{WebAppManifest/serviceworker}}. If those steps return - failure, abort these steps. -
  • Perform an unspecified sequence of actions to attempt to register the web application in the user's operating system (e.g., create shortcuts that launch the web application, register the application @@ -1540,11 +1529,6 @@

    result of running processing the related_applications member given manifest["related_applications"].

  • -
  • Set manifest["serviceworker"] to the result of - running processing the serviceworker member given - manifest["serviceworker"], manifest URL, - and serviceworker. -
  • Set manifest["shortcuts"] to the result of running processing the shortcuts member given manifest URL, and "shortcuts". @@ -1622,7 +1606,6 @@

    USVString theme_color; USVString background_color; USVString scope; - ServiceWorkerRegistrationObject serviceworker; sequence<ExternalApplicationResource> related_applications; boolean prefer_related_applications = "false"; sequence<ShortcutItem> shortcuts; @@ -2065,115 +2048,6 @@

  • -
    -

    - serviceworker member -

    -

    - The serviceworker member describes a service worker as - defined in [[SERVICE-WORKERS-1]]. -

    -

    - The serviceworker member represents an intented service - worker registration in form of a registration object -

    -

    - Other service worker registrations can be done, for instance by a - script; if these have different scopes they will be considered - separate registrations. If they have the same scope and script URL, - they coalesce. If they have different script URLs, last one wins. -

    -

    - The steps for processing the serviceworker - member are given by the following algorithm. The algorithm - takes a ServiceWorkerRegistrationObject - registration. This algorithm returns a - ServiceWorkerRegistrationObject registration, which - can be undefined. -

    -
      -
    1. If registration is undefined, return - undefined. -
    2. -
    3. Set registration["src"] to the result of running - processing the src member of a service worker - given registration["src"] and manifest URL. -
    4. -
    5. If the result of running is origin potentially trustworthy - with the origin of registration["src"] is Not - Trusted, issue a developer warning, abort these steps - and return undefined. -
    6. -
    7. Set registration["scope"] to the result of running - processing the scope member of a service worker - given registration["scope"]. -
    8. -
    9. Return registration. -
    10. -
    -
    - In the following example, the web application is listing a service - worker for the /foo scope, bypassing the user agent - cache when fetching the "sw.js" source: -
    -            "serviceworker": {
    -              "src": "sw.js",
    -              "scope": "/foo",
    -              "update_via_cache": "none"
    -            }
    -          
    -
    -

    - The steps for registering a manifest's service worker are - given by the following algorithm, which takes a - {{ServiceWorkerRegistrationObject}} registration and - returns success or failure. -

    -
      -
    1. Let serviceWorker be the {{ServiceWorkerContainer}} - associated with the top-level browsing context. If there is - none, return failure. -
    2. -
    3. Let options be the result of running the steps for - converting a service worker registration to an options dictionary - on registration. -
    4. -
    5. Let promise be the result of invoking - |serviceWorker|.{{ServiceWorkerContainer/register()}} with arguments - |registration|.{{ServiceWorkerRegistrationObject/src}} and - options. -
    6. -
    7. Wait until promise settles. If the settled - promise is rejected, return failure. -
    8. -
    9. Return success. -
    10. -
    -

    - The steps for converting a service worker registration to an - options dictionary are given by the following algorithm. The - algorithm takes a {{ServiceWorkerRegistrationObject}} - registration, and returns a {{RegistrationOptions}} - dictionary which is suitable to pass to - {{ServiceWorkerContainer}}.{{ServiceWorkerContainer/register()}}. -

    -
      -
    1. Create a new {{RegistrationOptions}} options. -
    2. -
    3. Set |options|.{{RegistrationOptions/scope}} to - |registration|.{{ServiceWorkerRegistrationObject/scope}}. -
    4. -
    5. Set |options|.{{RegistrationOptions/type}} to - |registration|.{{ServiceWorkerRegistrationObject/type}}. -
    6. -
    7. Set |options|.{{RegistrationOptions/updateViaCache}} to - |registration|.{{ServiceWorkerRegistrationObject/update_via_cache}}. -
    8. -
    9. Return options. -
    10. -
    -

    theme_color member @@ -3223,101 +3097,6 @@

    -
    -

    - The ServiceWorkerRegistrationObject dictionary and its members -

    -

    - A ServiceWorkerRegistrationObject dictionary represents a - service worker registration for the web application. -

    -
    -        dictionary ServiceWorkerRegistrationObject {
    -          required USVString src;
    -          USVString scope;
    -          WorkerType type = "classic";
    -          ServiceWorkerUpdateViaCache update_via_cache = "imports";
    -        };
    -      
    -
    -

    - src member -

    -

    - The src member of a ServiceWorkerRegistrationObject - dictionary is a URL representing a service worker. -

    -

    - The steps for processing the src member of a - service worker are given by the following algorithm. The - algorithm takes a USVString source URL, and a - URL manifest URL, which is the URL from - which the manifest was fetched. This algorithm will return - a URL or undefined. -

    -
      -
    1. If Type(source URL) is not String or - source URL is the empty string, then return - undefined. -
    2. -
    3. Otherwise, parse source URL using manifest - URL as the base URL and return the result. -
    4. -
    -
    -
    -

    - scope member -

    -

    - The scope member of a ServiceWorkerRegistrationObject - dictionary is the service worker's associated scope URL. -

    -

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

    -
      -
    1. If scope URL is undefined, return - undefined -
    2. -
    3. Otherwise, parse scope URL using manifest - URL as the base URL and return the result. -
    4. -
    -
    -
    -

    - type member -

    -

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

    -
    -
    -

    - update_via_cache member -

    -

    - The update_via_cache member of a - ServiceWorkerRegistrationObject dictionary determines the - update via - cache mode for the service worker. The possible values are those - of the {{ServiceWorkerUpdateViaCache}} enum defined in - [[SERVICE-WORKERS-1]]. -

    -
    -