Skip to content

Commit d122445

Browse files
committed
Editorial: correct rendering of nested algo steps
Bikeshed version 3.14.5 (the lastest at the time of writing) requires four spaces of indentation for a list item to be rendered as part of a nested list. This specification inconsistently uses just two spaces of indentation, resulting innacurracies in the rendered document. For instances, [the enable() method](https://w3c.github.io/ServiceWorker/#navigation-preload-manager-enable) appears as a flat list of sequential steps: > 1. Let promise be a new promise. > 2. Run the following steps in parallel: > 3. Let registration be this's associated service worker registration. > 4. If registration’s active worker is null, reject promise with an "InvalidStateError" DOMException, and abort these steps. > 5. Set registration’s navigation preload enabled flag. > 6. Resolve promise with undefined. > 7. Return promise. Insert additional spaces so that nested lists are rendered appropriately in the published document.
1 parent fa114cd commit d122445

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

docs/index.bs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,10 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
961961

962962
1. Let |promise| be [=a new promise=].
963963
1. Run the following steps [=in parallel=]:
964-
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
965-
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
966-
1. Set |registration|'s [=navigation preload enabled flag=].
967-
1. Resolve |promise| with undefined.
964+
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
965+
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
966+
1. Set |registration|'s [=navigation preload enabled flag=].
967+
1. Resolve |promise| with undefined.
968968
1. Return |promise|.
969969
</section>
970970

@@ -975,10 +975,10 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
975975

976976
1. Let |promise| be [=a new promise=].
977977
1. Run the following steps [=in parallel=]:
978-
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
979-
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
980-
1. Unset |registration|'s [=navigation preload enabled flag=].
981-
1. Resolve |promise| with undefined.
978+
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
979+
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
980+
1. Unset |registration|'s [=navigation preload enabled flag=].
981+
1. Resolve |promise| with undefined.
982982
1. Return |promise|.
983983
</section>
984984

@@ -989,10 +989,10 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
989989

990990
1. Let |promise| be [=a new promise=].
991991
1. Run the following steps [=in parallel=]:
992-
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
993-
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
994-
1. Set |registration|'s [=navigation preload header value=] to |value|.
995-
1. Resolve |promise| with undefined.
992+
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
993+
1. If |registration|'s [=active worker=] is null, [=reject=] |promise| with an "{{InvalidStateError}}" {{DOMException}}, and abort these steps.
994+
1. Set |registration|'s [=navigation preload header value=] to |value|.
995+
1. Resolve |promise| with undefined.
996996
1. Return |promise|.
997997
</section>
998998

@@ -1003,11 +1003,11 @@ spec: storage; urlPrefix: https://storage.spec.whatwg.org/
10031003

10041004
1. Let |promise| be [=a new promise=].
10051005
1. Run the following steps [=in parallel=]:
1006-
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
1007-
1. Let |state| be a new {{NavigationPreloadState}} dictionary.
1008-
1. If |registration|'s [=navigation preload enabled flag=] is set, set |state|["{{NavigationPreloadState/enabled}}"] to true.
1009-
1. Set |state|["{{NavigationPreloadState/headerValue}}"] to |registration|'s [=navigation preload header value=].
1010-
1. Resolve |promise| with |state|.
1006+
1. Let |registration| be [=this=]'s associated [=/service worker registration=].
1007+
1. Let |state| be a new {{NavigationPreloadState}} dictionary.
1008+
1. If |registration|'s [=navigation preload enabled flag=] is set, set |state|["{{NavigationPreloadState/enabled}}"] to true.
1009+
1. Set |state|["{{NavigationPreloadState/headerValue}}"] to |registration|'s [=navigation preload header value=].
1010+
1. Resolve |promise| with |state|.
10111011
1. Return |promise|.
10121012
</section>
10131013

0 commit comments

Comments
 (0)