You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: spec.bs
+20-17
Original file line number
Diff line number
Diff line change
@@ -703,12 +703,12 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
703
703
704
704
The {{Worklet/addModule()}} method steps for {{Worklet}} will need to include the following step before the step "Let |promise| be a new promise":
705
705
706
-
4. If |this| is of type {{SharedStorageWorklet}}:
707
-
1. Let |addModuleAllowedResult| be the result of running [=check if addModule is allowed and update state=] given |this| and <var ignore=''>moduleURLRecord</var>.
706
+
4. If [=this=] is of type {{SharedStorageWorklet}}:
707
+
1. Let |addModuleAllowedResult| be the result of running [=check if addModule is allowed and update state=] given [=this=] and <var ignore=''>moduleURLRecord</var>.
708
708
1. If |addModuleAllowedResult| is "DisallowedDueToNonPreferenceError":
709
709
1. Return [=a promise rejected with=] a {{TypeError}}.
710
710
1. Else if |addModuleAllowedResult| is "DisallowedDueToPreferenceError":
711
-
1. If |this|'s [=SharedStorageWorklet/has cross-origin data origin=] is false, then return [=a promise rejected with=] a {{TypeError}}.
711
+
1. If [=this=]'s [=SharedStorageWorklet/has cross-origin data origin=] is false, then return [=a promise rejected with=] a {{TypeError}}.
712
712
1. Else:
713
713
1. [=Assert=]: |addModuleAllowedResult| is "Allowed".
714
714
@@ -722,7 +722,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
722
722
723
723
After the step "Let <var ignore=''>addedSuccessfully</var> be false", we need to include the following step:
724
724
725
-
4. If |this| is of type {{SharedStorageWorklet}}, [=SharedStorageWorklet/has cross-origin data origin=] is true, and [=SharedStorageWorklet/data origin=] is not `"script-origin"`:
725
+
4. If [=this=] is of type {{SharedStorageWorklet}}, [=SharedStorageWorklet/has cross-origin data origin=] is true, and [=SharedStorageWorklet/data origin=] is not `"script-origin"`:
726
726
1. [=Assert=] |pendingTasks| is 1.
727
727
1. Set |pendingTasks| to 2.
728
728
1. [=Queue a global task=] on the [=networking task source=] given <var ignore=''>workletGlobalScope</var> to perform the following steps:
@@ -758,7 +758,7 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
758
758
1. Abort these steps.
759
759
1. Let |doesMatch| be the result of running [=check for script and context origin match=] on |item|[`scriptOrigin`], <var ignore=''>moduleURLRecord</var>'s [=url/origin=], |item|[`contextOrigin`], and |outsideSettings|'s [=environment settings object/origin=].
760
760
1. If |doesMatch| is true:
761
-
1. [=Queue a global task=] on the [=networking task source=] given |this|'s [=relevant global object=] to perform the following steps:
761
+
1. [=Queue a global task=] on the [=networking task source=] given [=this=]'s [=relevant global object=] to perform the following steps:
762
762
1. If |pendingTasks| is not −1, then:
763
763
1. Set |pendingTasks| to |pendingTasks| − 1.
764
764
1. If |pendingTasks| is 0, perform the following steps:
@@ -779,9 +779,9 @@ Moreover, each {{SharedStorageWorklet}}'s [=global scopes|list of global scopes=
779
779
780
780
Just before the final step, currently "Return <var ignore>promise</var>.", add the following step:
781
781
782
-
7. If |this| is a {{SharedStorageWorklet}}, [=upon fulfillment=] of |promise| or
782
+
7. If [=this=] is a {{SharedStorageWorklet}}, [=upon fulfillment=] of |promise| or
783
783
[=upon rejection=] of |promise|, run the following steps:
784
-
1. Let |globalScopes| be |this|'s [=Worklet/global scopes=].
784
+
1. Let |globalScopes| be [=this=]'s [=Worklet/global scopes=].
@@ -1487,14 +1487,15 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
1487
1487
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
1488
1488
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
1489
1489
1. If |databaseMap| is failure, throw a {{TypeError}}.
1490
-
1. Set |this|'s [=SharedStorageSetMethod/key=] to |key|.
1491
-
1. Set |this|'s [=SharedStorageSetMethod/value=] to |value|.
1492
-
1. Set |this|'s [=SharedStorageSetMethod/ignore if present=] to |options|["{{SharedStorageSetMethodOptions/ignoreIfPresent}}"].
1490
+
1. Set [=this=]'s [=SharedStorageSetMethod/key=] to |key|.
1491
+
1. Set [=this=]'s [=SharedStorageSetMethod/value=] to |value|.
1492
+
1. Set [=this=]'s [=SharedStorageSetMethod/ignore if present=] to |options|["{{SharedStorageSetMethodOptions/ignoreIfPresent}}"].
1493
1493
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"][=map/exists=]:
1494
1494
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1495
-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1495
+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1511,13 +1512,14 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
1511
1512
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
1512
1513
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
1513
1514
1. If |databaseMap| is failure, throw a {{TypeError}}.
1514
-
1. Set |this|'s [=SharedStorageAppendMethod/key=] to |key|.
1515
-
1. Set |this|'s [=SharedStorageAppendMethod/value=] to |value|.
1515
+
1. Set [=this=]'s [=SharedStorageAppendMethod/key=] to |key|.
1516
+
1. Set [=this=]'s [=SharedStorageAppendMethod/value=] to |value|.
1516
1517
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"][=map/exists=]:
1517
1518
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1518
-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1519
+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1519
1520
</div>
1520
1521
1522
+
<div algorithm>
1521
1523
The <dfn constructor for="SharedStorageDeleteMethod" lt="SharedStorageDeleteMethod(key)">new SharedStorageAppendMethod(|key|, |options|)</dfn> constructor steps are:
1522
1524
1523
1525
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1533,12 +1535,13 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
1533
1535
1. Let |environment| be |context|'s [=active window=]'s [=relevant settings object=].
1534
1536
1. Let |databaseMap| be the result of running [=obtain a shared storage bottle map=] given |environment| and |environment|'s [=environment settings object/origin=].
1535
1537
1. If |databaseMap| is failure, throw a {{TypeError}}.
1536
-
1. Set |this|'s [=SharedStorageDeleteMethod/key=] to |key|.
1538
+
1. Set [=this=]'s [=SharedStorageDeleteMethod/key=] to |key|.
1537
1539
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"][=map/exists=]:
1538
1540
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1539
-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1541
+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1540
1542
</div>
1541
1543
1544
+
<div algorithm>
1542
1545
The <dfn constructor for="SharedStorageClearMethod" lt="SharedStorageClearMethod()">new SharedStorageClearMethod(|options|)</dfn> constructor steps are:
1543
1546
1544
1547
1. Let |globalObject| be the [=current realm=]'s [=global object=].
@@ -1555,7 +1558,7 @@ A {{SharedStorageDeleteMethod}} has the following associated fields:
1555
1558
1. If |databaseMap| is failure, throw a {{TypeError}}.
1556
1559
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"][=map/exists=]:
1557
1560
1. If |options|["{{SharedStorageModifierMethodOptions/withLock}}"] starts with U+002D HYPHEN-MINUS (-), throw a {{TypeError}}.
1558
-
1. Set |this|'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1561
+
1. Set [=this=]'s [=SharedStorageModifierMethod/with lock=] to |options|["{{SharedStorageModifierMethodOptions/withLock}}"].
1559
1562
</div>
1560
1563
1561
1564
The {{SharedStorage}} Interface {#shared-storage-interface}
0 commit comments