@@ -385,7 +385,14 @@ <h2>
385
385
"https://www.w3.org/TR/html51/browsers.html#list-of-the-descendant-browsing-contexts ">
386
386
list of descendant browsing contexts</ a > </ dfn > , and < dfn > < a href =
387
387
"https://www.w3.org/TR/html51/browsers.html#creating-a-new-browsing-context ">
388
- creating a new browsing context</ a > </ dfn > are defined in [[!HTML51]].
388
+ creating a new browsing context</ a > </ dfn > , and < dfn > < a href =
389
+ "https://www.w3.org/TR/html51/webappapis.html#current "> current
390
+ realm</ a > </ dfn > are defined by [[!HTML51]].
391
+ </ p >
392
+ < p >
393
+ The term < dfn > < a href =
394
+ "https://tc39.github.io/ecma262/#sec-code-realms "> JavaScript
395
+ realm</ a > </ dfn > is defined in [[!ECMASCRIPT]].
389
396
</ p >
390
397
< p >
391
398
The terms < dfn > < code > < a href =
@@ -900,6 +907,10 @@ <h3>
900
907
The < a > task source</ a > for the tasks mentioned in this specification
901
908
is the < dfn > presentation task source</ dfn > .
902
909
</ p >
910
+ < p >
911
+ Unless otherwise specified, the < a > JavaScript realm</ a > for script
912
+ objects constructed by algorithm steps is the < a > current realm</ a > .
913
+ </ p >
903
914
</ section >
904
915
< section >
905
916
< h3 >
@@ -1663,7 +1674,8 @@ <h4>
1663
1674
< code > presentationRequest</ code > , return that < a > Promise</ a > and
1664
1675
abort these steps.
1665
1676
</ li >
1666
- < li > Otherwise, let < var > P</ var > be a new < a > Promise</ a > .
1677
+ < li > Otherwise, let < var > P</ var > be a new < a > Promise</ a > constructed
1678
+ in the < a > JavaScript realm</ a > of < var > presentationRequest</ var > .
1667
1679
</ li >
1668
1680
< li > Return < var > P</ var > , but continue running these steps < a > in
1669
1681
parallel</ a > .
@@ -1694,8 +1706,9 @@ <h4>
1694
1706
</ li >
1695
1707
< li > Set the < a > presentation display availability</ a > for
1696
1708
< var > presentationRequest</ var > to a newly created
1697
- < a > PresentationAvailability</ a > object, and let < var > A</ var > be
1698
- that object.
1709
+ < a > PresentationAvailability</ a > object constructed in the
1710
+ < a > JavaScript realm</ a > of < var > presentationRequest</ var > , and let
1711
+ < var > A</ var > be that object.
1699
1712
</ li >
1700
1713
< li > Create a tuple < em > (< var > A</ var > ,
1701
1714
< var > presentationUrls</ var > )</ em > and add it to the < a > set of
@@ -2670,7 +2683,8 @@ <h3>
2670
2683
and abort all remaining steps.
2671
2684
</ li >
2672
2685
< li > Otherwise, let the < a > presentation controllers promise</ a > be a
2673
- new < a > Promise</ a > .
2686
+ new < a > Promise</ a > constructed in the < a > JavaScript realm</ a > of this
2687
+ < a > PresentationReceiver</ a > object.
2674
2688
</ li >
2675
2689
< li > Return the < a > presentation controllers promise</ a > .
2676
2690
</ li >
@@ -2880,7 +2894,9 @@ <h4>
2880
2894
< code > null</ code > , run the following steps < a > in parallel</ a > .
2881
2895
< ol >
2882
2896
< li > Let the < a > presentation controllers monitor</ a > be a new
2883
- < a > PresentationConnectionList</ a > .
2897
+ < a > PresentationConnectionList</ a > constructed in the
2898
+ < a > JavaScript realm</ a > of the < a > PresentationReceiver</ a >
2899
+ object of the < a > receiving browsing context</ a > .
2884
2900
</ li >
2885
2901
< li > Populate the < a > presentation controllers monitor</ a > with
2886
2902
the < a > set of presentation controllers</ a > .
0 commit comments