Skip to content

Commit 5614cf1

Browse files
authored
Define algorithms for the HTML spec to call when a navigable is created or destroyed (#708)
* Link browsingContext.contextCreated to the html spec * remove html patch
1 parent 47efd66 commit 5614cf1

File tree

1 file changed

+8
-29
lines changed

1 file changed

+8
-29
lines changed

index.bs

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4155,14 +4155,14 @@ To <dfn>Emit a context created event</dfn> given |session| and |context|:
41554155

41564156
</div>
41574157

4158-
<div algorithm="remote end event trigger for browsingContext.contextCreated">
41594158

4160-
The [=remote end event trigger=] is:
4159+
<div algorithm="remote end event trigger for browsingContext.contextCreated">
41614160

4162-
When the [=create a new browsing context=] algorithm is invoked, after the
4163-
[=active document=] of the browsing context is set, run the following steps:
4161+
The [=remote end event trigger=] is
4162+
the <dfn export>WebDriver BiDi navigable created</dfn> steps given
4163+
|navigable|:
41644164

4165-
1. Let |context| be the newly created browsing context.
4165+
1. Let |context| be |navigable|'s [=active browsing context=].
41664166

41674167
1. Let |related browsing contexts| be a [=/set=] containing |context|.
41684168

@@ -4202,9 +4202,9 @@ The [=remote end event trigger=] is:
42024202

42034203
<div algorithm="remote end event trigger for browsingContext.contexDestroyed">
42044204

4205-
Define the following [=browsing context tree discarded=] steps:
4206-
4207-
1. Let |context| be the browsing context being discarded.
4205+
The [=remote end event trigger=] is
4206+
the <dfn export>WebDriver BiDi navigable destroyed</dfn> steps given
4207+
<var ignore>navigable</var> and |context|:
42084208

42094209
1. Let |params| be the result of [=get the browsing context info=], given
42104210
|context|, null, and true.
@@ -10706,27 +10706,6 @@ as part of the standards process.
1070610706

1070710707
## HTML ## {#patches-html}
1070810708

10709-
The [=a browsing context is discarded=] algorithm is modified to read as follows:
10710-
10711-
<div algorithm>
10712-
To discard a browsing context |browsingContext|, run these steps:
10713-
10714-
1. If this is not a recursive invocation of this algorithm, call any <dfn export>browsing context
10715-
tree discarded</dfn> steps defined in other applicable specifications with |browsingContext|.
10716-
10717-
1. Discard all {{Document}} objects for all the entries in |browsingContext|'s
10718-
[=session history=].
10719-
10720-
1. If |browsingContext| is a [=top-level browsing context=], then [=remove a browsing context=]
10721-
|browsingContext|.
10722-
10723-
</div>
10724-
10725-
Issue: The actual patch might be better to split the algorithm into an outer algorithm that is
10726-
called by external callers and an inner algorithm that's used for recursive calls. That's quite hard
10727-
to express as a patch to the specification since it requires changing multiple parts.
10728-
10729-
1073010709
The [=report an error=] algorithm is modified with an additional step at the
1073110710
end:
1073210711

0 commit comments

Comments
 (0)