Skip to content

Commit 31fd732

Browse files
committed
Handle navigation committed event
1 parent e25f510 commit 31fd732

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

index.bs

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,6 +2840,7 @@ BrowsingContextEvent = (
28402840
browsingContext.HistoryUpdated //
28412841
browsingContext.Load //
28422842
browsingContext.NavigationAborted //
2843+
browsingContext.NavigationCommitted //
28432844
browsingContext.NavigationFailed //
28442845
browsingContext.NavigationStarted //
28452846
browsingContext.UserPromptClosed //
@@ -3041,9 +3042,13 @@ To <dfn>await a navigation</dfn> given |navigable|, |request|, |wait condition|,
30413042

30423043
1. Return [=success=] with data |body|.
30433044

3044-
1. If |wait condition| is "<code>interactive</code>", let |event name| be
3045-
"<code>domContentLoaded</code>", otherwise let |event name| be
3046-
"<code>load</code>".
3045+
1. If |wait condition| is "<code>committed</code>", let |event name| be
3046+
"<code>committed</code>".
3047+
3048+
1. Otherwise, if |wait condition| is "<code>interactive</code>", let |event name| be
3049+
"<code>domContentLoaded</code>".
3050+
3051+
1. Otherwise, let |event name| be "<code>load</code>".
30473052

30483053
1. Let (|event received|, |status|) be [=await=] given «|event name|,
30493054
"<code>download started</code>", "<code>navigation aborted</code>",
@@ -3168,7 +3173,7 @@ To <dfn>get the navigation info</dfn>, given |navigable| and |navigation status|
31683173
#### The browsingContext.ReadinessState Type #### {#type-browsingContext-ReadinessState}
31693174

31703175
<pre class="cddl remote-cddl">
3171-
browsingContext.ReadinessState = "none" / "interactive" / "complete"
3176+
browsingContext.ReadinessState = "none" / "committed" / "interactive" / "complete"
31723177
</pre>
31733178

31743179
The <code>browsingContext.ReadinessState</code> type represents the stage of
@@ -5116,6 +5121,44 @@ aborted</dfn> steps given |navigable| and |navigation status|:
51165121

51175122
</div>
51185123

5124+
#### The browsingContext.navigationCommitted Event #### {#event-browsingContext-navigationCommitted}
5125+
5126+
<dl>
5127+
<dt>Event Type</dt>
5128+
<dd>
5129+
<pre class="cddl local-cddl">
5130+
browsingContext.NavigationCommitted = (
5131+
method: "browsingContext.navigationCommitted",
5132+
params: browsingContext.NavigationInfo
5133+
)
5134+
</pre>
5135+
</dd>
5136+
</dl>
5137+
5138+
<div algorithm>
5139+
The [=remote end event trigger=] is the <dfn export>WebDriver BiDi navigation
5140+
committed</dfn> steps given |navigable| and |navigation status|:
5141+
5142+
1. Let |params| be the result of [=get the navigation info=] given |navigable|
5143+
and |navigation status|.
5144+
5145+
1. Let |body| be a [=/map=] matching the
5146+
<code>browsingContext.NavigationCommitted</code> production, with the
5147+
<code>params</code> field set to |params|.
5148+
5149+
1. Let |navigation id| be |navigation status|'s id.
5150+
5151+
1. Let |related navigables| be a [=/set=] containing |navigable|.
5152+
5153+
1. [=Resume=] with "<code>navigation committed</code>", |navigation id|, and |navigation status|.
5154+
5155+
1. For each |session| in the [=set of sessions for which an event is enabled=]
5156+
given "<code>browsingContext.navigationCommitted</code>" and |related navigables|:
5157+
5158+
1. [=Emit an event=] with |session| and |body|.
5159+
5160+
</div>
5161+
51195162

51205163
#### The browsingContext.navigationFailed Event #### {#event-browsingContext-navigationFailed}
51215164

0 commit comments

Comments
 (0)