@@ -836,15 +836,18 @@ <h3>
836
836
</ p >
837
837
< p >
838
838
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 > .
840
847
</ p >
841
848
< p >
842
849
Unless otherwise specified, the < a > JavaScript realm</ a > for script
843
850
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 > .
848
851
</ p >
849
852
</ section >
850
853
< section >
@@ -1042,10 +1045,6 @@ <h4>
1042
1045
< h4 >
1043
1046
Selecting a presentation display
1044
1047
</ 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 >
1049
1048
< p >
1050
1049
When the < code > < dfn data-dfn-for =
1051
1050
"PresentationRequest "> start</ dfn > </ code > method is called, the
@@ -1113,15 +1112,15 @@ <h4>
1113
1112
</ ol > Then run the following steps:
1114
1113
< ol >
1115
1114
< 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.
1118
1117
</ li >
1119
1118
< li > Abort all remaining steps.
1120
1119
</ li >
1121
1120
</ ol >
1122
1121
</ li >
1123
1122
< 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
1125
1124
{{NotAllowedError}} exception, and abort all remaining steps.
1126
1125
</ li >
1127
1126
< li > Otherwise, the user < em > grants permission</ em > to use a
@@ -1230,6 +1229,10 @@ <h4>
1230
1229
</ dd >
1231
1230
</ dl >
1232
1231
< ol >
1232
+ < li >
1233
+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
1234
+ parallel</ a > .
1235
+ </ li >
1233
1236
< li > Let < var > I</ var > be a new < a > valid presentation identifier</ a >
1234
1237
unique among all < a > presentation identifiers</ a > for known
1235
1238
< a > presentation connections</ a > in the < a > set of controlled
@@ -1255,11 +1258,11 @@ <h4>
1255
1258
</ li >
1256
1259
< li > Add < var > S</ var > to the < a > set of controlled presentations</ a > .
1257
1260
</ 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 > .
1260
1263
</ li >
1261
1264
< 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
1263
1266
< a data-link-for ="PresentationRequest "> connectionavailable</ a > ,
1264
1267
that uses the < a > PresentationConnectionAvailableEvent</ a >
1265
1268
interface, with the < a data-link-for =
@@ -1322,8 +1325,8 @@ <h4>
1322
1325
< ol >
1323
1326
< li > Let < var > P</ var > be a new {{Promise}}.
1324
1327
</ 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 > .
1327
1330
</ li >
1328
1331
< li > Search the < a > set of controlled presentations</ a > for a
1329
1332
< a > PresentationConnection</ a > that meets the following criteria:
@@ -1350,8 +1353,8 @@ <h4>
1350
1353
< a > PresentationConnection</ a > .
1351
1354
</ li >
1352
1355
< 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 > .
1355
1358
</ li >
1356
1359
< li > If the < a > presentation connection state</ a > of
1357
1360
< var > existingConnection</ var > is < a data-link-for =
@@ -1413,12 +1416,12 @@ <h4>
1413
1416
presentations</ a > .
1414
1417
</ li >
1415
1418
< 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 > .
1418
1421
</ li >
1419
1422
< 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 =
1422
1425
"PresentationRequest "> connectionavailable</ a > , that uses the
1423
1426
< a > PresentationConnectionAvailableEvent</ a > interface, with
1424
1427
the < a data-link-for =
@@ -1436,8 +1439,8 @@ <h4>
1436
1439
</ ol >
1437
1440
</ li >
1438
1441
< 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.
1441
1444
</ li >
1442
1445
</ ol >
1443
1446
</ section >
@@ -1631,8 +1634,8 @@ <h4>
1631
1634
then:
1632
1635
< ol >
1633
1636
< 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.
1636
1639
</ li >
1637
1640
< li > Abort all the remaining steps.
1638
1641
</ li >
@@ -1642,8 +1645,9 @@ <h4>
1642
1645
< var > presentationRequest</ var > is not < code > null</ code > , then:
1643
1646
< ol >
1644
1647
< 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 > .
1647
1651
</ li >
1648
1652
< li > Abort all the remaining steps.
1649
1653
</ li >
@@ -1668,8 +1672,8 @@ <h4>
1668
1672
</ div >
1669
1673
</ li >
1670
1674
< 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 > .
1673
1677
</ li >
1674
1678
</ ol >
1675
1679
</ section >
@@ -1686,6 +1690,10 @@ <h4>
1686
1690
steps:
1687
1691
</ p >
1688
1692
< ol >
1693
+ < li >
1694
+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
1695
+ parallel</ a > .
1696
+ </ li >
1689
1697
< li > Let < var > availabilitySet</ var > be a shallow copy of the < a > set
1690
1698
of presentation availability objects</ a > .
1691
1699
</ li >
@@ -1753,8 +1761,8 @@ <h4>
1753
1761
< var > newAvailability</ var > and skip the following step.
1754
1762
</ li >
1755
1763
< 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:
1758
1766
< ol >
1759
1767
< li > Set < var > A</ var > 's < a > value</ a > property to
1760
1768
< var > newAvailability</ var > .
@@ -2037,6 +2045,10 @@ <h4>
2037
2045
</ dd >
2038
2046
</ dl >
2039
2047
< ol >
2048
+ < li >
2049
+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2050
+ parallel</ a > .
2051
+ </ li >
2040
2052
< li > If the < a > presentation connection state</ a > of
2041
2053
< var > presentationConnection</ var > is not < a data-link-for =
2042
2054
"PresentationConnectionState "> connecting</ a > , then abort all
@@ -2203,6 +2215,10 @@ <h4>
2203
2215
</ dd >
2204
2216
</ dl >
2205
2217
< 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 >
2206
2222
< li > If the < a > state</ a > property of
2207
2223
< var > presentationConnection</ var > is not < a data-link-for =
2208
2224
"PresentationConnectionState "> connected</ a > , abort these steps.
@@ -2232,7 +2248,7 @@ <h4>
2232
2248
</ ol >
2233
2249
</ li >
2234
2250
< 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=]
2236
2252
< var > event</ var > at < var > presentationConnection</ var > .
2237
2253
</ li >
2238
2254
</ ol >
@@ -2398,7 +2414,7 @@ <h4>
2398
2414
< var > presentationConnection</ var > , then abort the remaining steps.
2399
2415
</ li >
2400
2416
< 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:
2402
2418
< ol >
2403
2419
< li > If the < a > presentation connection state</ a > of
2404
2420
< var > presentationConnection</ var > is not < a data-link-for =
@@ -2449,6 +2465,10 @@ <h4>
2449
2465
MUST run the following steps:
2450
2466
</ p >
2451
2467
< ol >
2468
+ < li >
2469
+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2470
+ parallel</ a > .
2471
+ </ li >
2452
2472
< li > If the < a > presentation connection state</ a > of
2453
2473
< var > connection</ var > is not < a data-link-for =
2454
2474
"PresentationConnectionState "> connected</ a > or < a data-link-for =
@@ -2465,7 +2485,8 @@ <h4>
2465
2485
connection</ var > is < a data-link-for =
2466
2486
"PresentationConnectionState "> connected</ a > or
2467
2487
< 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:
2469
2490
< ol >
2470
2491
< li > Set the < a > presentation connection state</ a > of
2471
2492
< var > known connection</ var > to < a data-link-for =
@@ -2547,10 +2568,10 @@ <h4>
2547
2568
the user interface and discard it.
2548
2569
</ li >
2549
2570
< 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 > .
2554
2575
< p class ="note ">
2555
2576
Only one termination confirmation needs to be sent per
2556
2577
< a > controlling user agent</ a > .
@@ -2571,7 +2592,7 @@ <h4>
2571
2592
< ol >
2572
2593
< li > For each < var > connection</ var > in the < a > set of controlled
2573
2594
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:
2575
2596
< ol >
2576
2597
< li > If the < a > presentation connection state</ a > of
2577
2598
< var > connection</ var > is not < a data-link-for =
@@ -2895,6 +2916,10 @@ <h4>
2895
2916
</ dd >
2896
2917
</ dl >
2897
2918
< ol >
2919
+ < li >
2920
+ < a data-cite ="!INFRA#assert "> Assert</ a > : this is running < a > in
2921
+ parallel</ a > .
2922
+ </ li >
2898
2923
< li > If < var > presentationId</ var > and < var > I</ var > are not equal,
2899
2924
refuse the connection and abort all remaining steps.
2900
2925
</ li >
@@ -2932,9 +2957,9 @@ <h4>
2932
2957
the < a > set of presentation controllers</ a > .
2933
2958
</ li >
2934
2959
< 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 > .
2938
2963
</ li >
2939
2964
< li > Abort all remaining steps.
2940
2965
</ li >
@@ -2946,8 +2971,8 @@ <h4>
2946
2971
the < a > set of presentation controllers</ a > .
2947
2972
</ li >
2948
2973
< 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 =
2951
2976
"PresentationConnectionList "> connectionavailable</ a > , that
2952
2977
uses the < a > PresentationConnectionAvailableEvent</ a >
2953
2978
interface, with the < a data-link-for =
0 commit comments