From 5a56e10e4a57a15753d51caa389b9f44c05a35a9 Mon Sep 17 00:00:00 2001
From: Matt Giuca
Date: Thu, 12 Sep 2019 16:12:24 +1000
Subject: [PATCH] Make Service Worker registration work properly (don't use
outdated steps).
Closes #789.
---
index.html | 111 +++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 87 insertions(+), 24 deletions(-)
diff --git a/index.html b/index.html
index 35f02bc26..8e45d7304 100644
--- a/index.html
+++ b/index.html
@@ -370,26 +370,14 @@
following algorithm:
- - Let manifest and manifest URL be the values
- that were created during steps to determine installability of the
- document.
+
- Let manifest be the manifest value created during
+ steps to determine installability of the document.
- - If manifest URL exists, and the result of running
- processing the `serviceworker` member with manifest
- returns a valid registration, the user agent MAY:
-
- - Let client be the top-level browsing
- context {{Document}}'s relevant settings object, or
-
null
if unavailable.
-
- - Invoke Start Register with scope and
- src members of the registration, a new
- promise, client, manifest URL,
- plus the type and update_via_cache
- members of the registration. If the settled
- promise is rejected, abort these steps.
-
-
+ - 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
@@ -406,7 +394,6 @@
context for which the installation took place.
-