@@ -8628,11 +8628,12 @@ JavaScript code.
8628
8628
The <code>delay(|ms|)</code> method steps are:
8629
8629
8630
8630
1. Let |realm| be [=this=]'s [=relevant Realm=].
8631
+ 1. Let |taskSource| be some appropriate [=task source=].
8631
8632
1. If |ms| is NaN, let |ms| be +0; otherwise let |ms| be the maximum of |ms| and +0.
8632
8633
1. Let |p| be [=a new promise=] in |realm|.
8633
8634
1. Run the following steps [=in parallel=]:
8634
8635
1. Wait |ms| milliseconds.
8635
- 1. [=Resolve =] |p|.
8636
+ 1. [=Queue a task=] on |taskSource| to [=resolve =] |p|.
8636
8637
1. Return |p|.
8637
8638
</div>
8638
8639
</div>
@@ -8655,12 +8656,13 @@ JavaScript code.
8655
8656
The <code>validatedDelay(|ms|)</code> method steps are:
8656
8657
8657
8658
1. Let |realm| be [=this=]'s [=relevant Realm=].
8659
+ 1. Let |taskSource| be some appropriate [=task source=].
8658
8660
1. If |ms| is NaN, return [=a promise rejected with=] a {{TypeError}} in |realm|.
8659
8661
1. If |ms| < 0, return [=a promise rejected with=] a {{RangeError}} in |realm|.
8660
8662
1. Let |p| be [=a new promise=] in |realm|.
8661
8663
1. Run the following steps [=in parallel=]:
8662
8664
1. Wait |ms| milliseconds.
8663
- 1. [=Resolve =] |p|.
8665
+ 1. [=Queue a task=] on |taskSource| to [=resolve =] |p|.
8664
8666
1. Return |p|.
8665
8667
</div>
8666
8668
</div>
@@ -8688,13 +8690,11 @@ JavaScript code.
8688
8690
* If |promise| was fulfilled with value |v|, then:
8689
8691
1. Run the following steps [=in parallel=]:
8690
8692
1. Wait |ms| milliseconds.
8691
- 1. [=Queue a task=] to run the following steps on |taskSource|:
8692
- 1. [=Resolve=] |p| with |v|.
8693
+ 1. [=Queue a task=] on |taskSource| to [=resolve=] |p| with |v|.
8693
8694
* If |promise| was rejected with reason |r|, then:
8694
8695
1. Run the following steps [=in parallel=]:
8695
8696
1. Wait |ms| milliseconds.
8696
- 1. [=Queue a task=] to run the following steps on |taskSource|:
8697
- 1. [=Reject=] |p| with |r|.
8697
+ 1. [=Queue a task=] on |taskSource| to [=reject=] |p| with |r|.
8698
8698
1. Return |p|.
8699
8699
</div>
8700
8700
</div>
@@ -8726,14 +8726,16 @@ JavaScript code.
8726
8726
To create an <code>Environment</code> object in a [=Realm=] |realm|, perform the following
8727
8727
steps:
8728
8728
8729
+ 1. Let |taskSource| be some appropriate [=task source=].
8729
8730
1. Let |environment| be [=new=] <code>Environment</code> object in |realm|.
8730
8731
1. Set |environment|'s [=Environment/ready promise=] to [=a new promise=] in |realm|.
8731
8732
1. Run the following steps [=in parallel=]:
8732
8733
1. Do some asynchronous work.
8733
- 1. If |environment| becomes ready successfully, [=resolve=] |environment|'s
8734
- [=Environment/ready promise=].
8735
- 1. If |environment| fails to become ready, [=reject=] |environment|'s
8736
- [=Environment/ready promise=] with a "{{NetworkError!!exception}}" {{DOMException}}.
8734
+ 1. If |environment| becomes ready successfully, then [=queue a task=] on |taskSource| to
8735
+ [=resolve=] |environment|'s [=Environment/ready promise=].
8736
+ 1. If |environment| fails to become ready, then [=queue a task=] on |taskSource| to
8737
+ [=reject=] |environment|'s [=Environment/ready promise=] with a
8738
+ "{{NetworkError!!exception}}" {{DOMException}}.
8737
8739
1. Return |environment|.
8738
8740
</div>
8739
8741
</div>
@@ -8756,6 +8758,7 @@ JavaScript code.
8756
8758
8757
8759
The <code>addBookmark()</code> method steps are:
8758
8760
8761
+ 1. Let |taskSource| be some appropriate [=task source=].
8759
8762
1. If this method was not invoked as a result of explicit user action, return
8760
8763
[=a promise rejected with=] a "{{SecurityError}}" {{DOMException}}.
8761
8764
1. If the document's mode of operation is standalone, return [=a promise rejected with=] a
@@ -8766,9 +8769,9 @@ JavaScript code.
8766
8769
1. Using |info|, and in a manner that is user-agent specific, allow the end user to make a
8767
8770
choice as to whether they want to add the bookmark.
8768
8771
1. If the end-user aborts the request to add the bookmark (e.g., they hit escape, or
8769
- press a "cancel" button), [=reject =] |promise| with an "{{AbortError}}"
8770
- {{DOMException}}.
8771
- 1. Otherwise, [=resolve=] |promise|.
8772
+ press a "cancel" button), then [=queue a task =] on |taskSource| to [=reject=]
8773
+ |promise| with an "{{AbortError}}" {{DOMException}}.
8774
+ 1. Otherwise, [=queue a task=] on |taskSource| to [= resolve=] |promise|.
8772
8775
1. Return |promise|.
8773
8776
</div>
8774
8777
</div>
@@ -14718,6 +14721,7 @@ Anne van Kesteren,
14718
14721
Olav Junker Kjær,
14719
14722
Takayoshi Kochi,
14720
14723
Magnus Kristiansen,
14724
+ Raphael Kubo da Costa,
14721
14725
Takeshi Kurosawa,
14722
14726
Yves Lafon,
14723
14727
Travis Leithead,
0 commit comments