@@ -836,15 +836,18 @@ <h3>
836836 </ p >
837837 < p >
838838 The < a > task source</ a > for the tasks mentioned in this specification
839- is the < var > presentation task source</ var > .
839+ is the < dfn > presentation task source</ dfn > .
840+ </ p >
841+ < p >
842+ When an algorithm < dfn data-lt ="queue a Presentation API task "> queues
843+ a Presentation API task</ dfn > < var > T</ var > , the < a > user agent</ a >
844+ MUST < a > queue a global task</ a > < var > T</ var > on the < a > presentation
845+ task source</ a > using the < a data-cite ="!HTML#global-object "> global
846+ object</ a > of the < a > current realm</ a > .
840847 </ p >
841848 < p >
842849 Unless otherwise specified, the < a > JavaScript realm</ a > for script
843850 objects constructed by algorithm steps is the < a > current realm</ a > .
844- Unless otherwise specified, all global tasks use the < a data-cite =
845- "!HTML#networking-task-source "> networking task source</ a > associated
846- with the < a data-cite ="!HTML#global-object "> global object</ a > of the
847- < a > current realm</ a > .
848851 </ p >
849852 </ section >
850853 < section >
@@ -1042,10 +1045,6 @@ <h4>
10421045 < h4 >
10431046 Selecting a presentation display
10441047 </ h4 >
1045- < p >
1046- The global tasks queued in these steps use the < a data-cite =
1047- "!HTML#-interaction-task-source "> user interaction task source</ a > .
1048- </ p >
10491048 < p >
10501049 When the < code > < dfn data-dfn-for =
10511050 "PresentationRequest "> start</ dfn > </ code > method is called, the
@@ -1113,15 +1112,15 @@ <h4>
11131112 </ ol > Then run the following steps:
11141113 < ol >
11151114 < li >
1116- < a > Queue a global task</ a > to < a > reject</ a > < var > P </ var > with
1117- a {{NotFoundError}} exception.
1115+ < a > Queue a Presentation API task</ a > to < a > reject</ a >
1116+ < var > P </ var > with a {{NotFoundError}} exception.
11181117 </ li >
11191118 < li > Abort all remaining steps.
11201119 </ li >
11211120 </ ol >
11221121 </ li >
11231122 < li > If the user < em > denies permission</ em > to use a display,
1124- < a > queue a global task</ a > to reject < var > P</ var > with an
1123+ < a > queue a Presentation API task</ a > to reject < var > P</ var > with an
11251124 {{NotAllowedError}} exception, and abort all remaining steps.
11261125 </ li >
11271126 < li > Otherwise, the user < em > grants permission</ em > to use a
@@ -1230,6 +1229,10 @@ <h4>
12301229 </ dd >
12311230 </ dl >
12321231 < ol >
1232+ < li >
1233+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
1234+ parallel</ a > .
1235+ </ li >
12331236 < li > Let < var > I</ var > be a new < a > valid presentation identifier</ a >
12341237 unique among all < a > presentation identifiers</ a > for known
12351238 < a > presentation connections</ a > in the < a > set of controlled
@@ -1255,11 +1258,11 @@ <h4>
12551258 </ li >
12561259 < li > Add < var > S</ var > to the < a > set of controlled presentations</ a > .
12571260 </ li >
1258- < li > If < var > P</ var > is provided, < a > resolve </ a > < var > P </ var > with
1259- < var > S</ var > .
1261+ < li > If < var > P</ var > is provided, < a > queue a Presentation API
1262+ task </ a > to < a > resolve </ a > < var > P </ var > with < var > S</ var > .
12601263 </ li >
12611264 < li >
1262- < a > Queue a global task</ a > to [=fire an event=] named
1265+ < a > Queue a Presentation API task</ a > to [=fire an event=] named
12631266 < a data-link-for ="PresentationRequest "> connectionavailable</ a > ,
12641267 that uses the < a > PresentationConnectionAvailableEvent</ a >
12651268 interface, with the < a data-link-for =
@@ -1322,8 +1325,8 @@ <h4>
13221325 < ol >
13231326 < li > Let < var > P</ var > be a new {{Promise}}.
13241327 </ li >
1325- < li > Return < var > P</ var > , but continue running these steps in
1326- parallel.
1328+ < li > Return < var > P</ var > , but continue running these steps < a > in
1329+ parallel</ a > .
13271330 </ li >
13281331 < li > Search the < a > set of controlled presentations</ a > for a
13291332 < a > PresentationConnection</ a > that meets the following criteria:
@@ -1350,8 +1353,8 @@ <h4>
13501353 < a > PresentationConnection</ a > .
13511354 </ li >
13521355 < li >
1353- < a > Queue a global task</ a > to < a > resolve</ a > < var > P </ var >
1354- with < var > existingConnection</ var > .
1356+ < a > Queue a Presentation API task</ a > to < a > resolve</ a >
1357+ < var > P </ var > with < var > existingConnection</ var > .
13551358 </ li >
13561359 < li > If the < a > presentation connection state</ a > of
13571360 < var > existingConnection</ var > is < a data-link-for =
@@ -1413,12 +1416,12 @@ <h4>
14131416 presentations</ a > .
14141417 </ li >
14151418 < li >
1416- < a > Queue a global task</ a > to < a > resolve</ a > < var > P </ var >
1417- with < var > newConnection</ var > .
1419+ < a > Queue a Presentation API task</ a > to < a > resolve</ a >
1420+ < var > P </ var > with < var > newConnection</ var > .
14181421 </ li >
14191422 < li >
1420- < a > Queue a global task</ a > to [=fire an event=] named
1421- < a data-link-for =
1423+ < a > Queue a Presentation API task</ a > to [=fire an event=]
1424+ named < a data-link-for =
14221425 "PresentationRequest "> connectionavailable</ a > , that uses the
14231426 < a > PresentationConnectionAvailableEvent</ a > interface, with
14241427 the < a data-link-for =
@@ -1436,8 +1439,8 @@ <h4>
14361439 </ ol >
14371440 </ li >
14381441 < li >
1439- < a > Queue a global task</ a > to < a > reject</ a > < var > P </ var > with a
1440- {{NotFoundError}} exception.
1442+ < a > Queue a Presentation API task</ a > to < a > reject</ a >
1443+ < var > P </ var > with a {{NotFoundError}} exception.
14411444 </ li >
14421445 </ ol >
14431446 </ section >
@@ -1631,8 +1634,8 @@ <h4>
16311634 then:
16321635 < ol >
16331636 < li >
1634- < a > Queue a global task</ a > to < a > reject</ a > < var > P </ var > with
1635- a {{NotSupportedError}} exception.
1637+ < a > Queue a Presentation API task</ a > to < a > reject</ a >
1638+ < var > P </ var > with a {{NotSupportedError}} exception.
16361639 </ li >
16371640 < li > Abort all the remaining steps.
16381641 </ li >
@@ -1642,8 +1645,9 @@ <h4>
16421645 < var > presentationRequest</ var > is not < code > null</ code > , then:
16431646 < ol >
16441647 < li >
1645- < a > Queue a global task</ a > to < a > resolve</ a > < var > P</ var >
1646- with the request's < a > presentation display availability</ a > .
1648+ < a > Queue a Presentation API task</ a > to < a > resolve</ a >
1649+ < var > P</ var > with the request's < a > presentation display
1650+ availability</ a > .
16471651 </ li >
16481652 < li > Abort all the remaining steps.
16491653 </ li >
@@ -1668,8 +1672,8 @@ <h4>
16681672 </ div >
16691673 </ li >
16701674 < li >
1671- < a > Queue a global task</ a > to < a > resolve</ a > < var > P </ var > with
1672- < var > A</ var > .
1675+ < a > Queue a Presentation API task</ a > to < a > resolve</ a >
1676+ < var > P </ var > with < var > A</ var > .
16731677 </ li >
16741678 </ ol >
16751679 </ section >
@@ -1686,6 +1690,10 @@ <h4>
16861690 steps:
16871691 </ p >
16881692 < ol >
1693+ < li >
1694+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
1695+ parallel</ a > .
1696+ </ li >
16891697 < li > Let < var > availabilitySet</ var > be a shallow copy of the < a > set
16901698 of presentation availability objects</ a > .
16911699 </ li >
@@ -1753,8 +1761,8 @@ <h4>
17531761 < var > newAvailability</ var > and skip the following step.
17541762 </ li >
17551763 < li > If < var > previousAvailability</ var > is not equal to
1756- < var > newAvailability</ var > , then < a > queue a global task </ a > to
1757- run the following steps:
1764+ < var > newAvailability</ var > , then < a > queue a Presentation API
1765+ task </ a > to run the following steps:
17581766 < ol >
17591767 < li > Set < var > A</ var > 's < a > value</ a > property to
17601768 < var > newAvailability</ var > .
@@ -2037,6 +2045,10 @@ <h4>
20372045 </ dd >
20382046 </ dl >
20392047 < ol >
2048+ < li >
2049+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2050+ parallel</ a > .
2051+ </ li >
20402052 < li > If the < a > presentation connection state</ a > of
20412053 < var > presentationConnection</ var > is not < a data-link-for =
20422054 "PresentationConnectionState "> connecting</ a > , then abort all
@@ -2203,6 +2215,10 @@ <h4>
22032215 </ dd >
22042216 </ dl >
22052217 < ol data-link-for ="PresentationConnection ">
2218+ < li >
2219+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2220+ parallel</ a > .
2221+ </ li >
22062222 < li > If the < a > state</ a > property of
22072223 < var > presentationConnection</ var > is not < a data-link-for =
22082224 "PresentationConnectionState "> connected</ a > , abort these steps.
@@ -2232,7 +2248,7 @@ <h4>
22322248 </ ol >
22332249 </ li >
22342250 < li >
2235- < a > Queue a global task</ a > to [=fire an event|fire=]
2251+ < a > Queue a Presentation API task</ a > to [=fire an event|fire=]
22362252 < var > event</ var > at < var > presentationConnection</ var > .
22372253 </ li >
22382254 </ ol >
@@ -2398,7 +2414,7 @@ <h4>
23982414 < var > presentationConnection</ var > , then abort the remaining steps.
23992415 </ li >
24002416 < li >
2401- < a > Queue a global task</ a > to run the following steps:
2417+ < a > Queue a Presentation API task</ a > to run the following steps:
24022418 < ol >
24032419 < li > If the < a > presentation connection state</ a > of
24042420 < var > presentationConnection</ var > is not < a data-link-for =
@@ -2449,6 +2465,10 @@ <h4>
24492465 MUST run the following steps:
24502466 </ p >
24512467 < ol >
2468+ < li >
2469+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2470+ parallel</ a > .
2471+ </ li >
24522472 < li > If the < a > presentation connection state</ a > of
24532473 < var > connection</ var > is not < a data-link-for =
24542474 "PresentationConnectionState "> connected</ a > or < a data-link-for =
@@ -2465,7 +2485,8 @@ <h4>
24652485 connection</ var > is < a data-link-for =
24662486 "PresentationConnectionState "> connected</ a > or
24672487 < a data-link-for ="PresentationConnectionState "> connecting</ a > ,
2468- then < a > queue a global task</ a > to run the following steps:
2488+ then < a > queue a Presentation API task</ a > to run the
2489+ following steps:
24692490 < ol >
24702491 < li > Set the < a > presentation connection state</ a > of
24712492 < var > known connection</ var > to < a data-link-for =
@@ -2547,10 +2568,10 @@ <h4>
25472568 the user interface and discard it.
25482569 </ li >
25492570 < li > For each < var > connection</ var > in
2550- < var > connectedControllers</ var > , < a > queue a global task </ a > to send
2551- a termination confirmation for < var > P</ var > using an implementation
2552- specific mechanism to the < a > controlling user agent</ a > that owns
2553- the < a > destination browsing context</ a > for < var > connection</ var > .
2571+ < var > connectedControllers</ var > , send a termination confirmation
2572+ for < var > P</ var > using an implementation specific mechanism to the
2573+ < a > controlling user agent</ a > that owns the < a > destination browsing
2574+ context</ a > for < var > connection</ var > .
25542575 < p class ="note ">
25552576 Only one termination confirmation needs to be sent per
25562577 < a > controlling user agent</ a > .
@@ -2571,7 +2592,7 @@ <h4>
25712592 < ol >
25722593 < li > For each < var > connection</ var > in the < a > set of controlled
25732594 presentations</ a > that was connected to < var > P</ var > , < a > queue a
2574- global task</ a > to run the following steps:
2595+ Presentation API task</ a > to run the following steps:
25752596 < ol >
25762597 < li > If the < a > presentation connection state</ a > of
25772598 < var > connection</ var > is not < a data-link-for =
@@ -2895,6 +2916,10 @@ <h4>
28952916 </ dd >
28962917 </ dl >
28972918 < ol >
2919+ < li >
2920+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2921+ parallel</ a > .
2922+ </ li >
28982923 < li > If < var > presentationId</ var > and < var > I</ var > are not equal,
28992924 refuse the connection and abort all remaining steps.
29002925 </ li >
@@ -2932,9 +2957,9 @@ <h4>
29322957 the < a > set of presentation controllers</ a > .
29332958 </ li >
29342959 < li > If the < a > presentation controllers promise</ a > is not
2935- < code > null</ code > , < a > queue a global task</ a > to < a > resolve </ a >
2936- the < a > presentation controllers promise</ a > with the
2937- < a > presentation controllers monitor</ a > .
2960+ < code > null</ code > , < a > queue a Presentation API task</ a > to < a >
2961+ resolve </ a > the < a > presentation controllers promise</ a > with
2962+ the < a > presentation controllers monitor</ a > .
29382963 </ li >
29392964 < li > Abort all remaining steps.
29402965 </ li >
@@ -2946,8 +2971,8 @@ <h4>
29462971 the < a > set of presentation controllers</ a > .
29472972 </ li >
29482973 < li >
2949- < a > Queue a global task</ a > to [=fire an event=] named
2950- < a data-link-for =
2974+ < a > queue a Presentation API task</ a > to [=fire an event=]
2975+ named < a data-link-for =
29512976 "PresentationConnectionList "> connectionavailable</ a > , that
29522977 uses the < a > PresentationConnectionAvailableEvent</ a >
29532978 interface, with the < a data-link-for =
0 commit comments