diff --git a/index.bs b/index.bs
index b5588c13b..cde953193 100644
--- a/index.bs
+++ b/index.bs
@@ -1321,7 +1321,7 @@ events are disabled, the return value is always empty.
1. For each |context id| in |browsing contexts|:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |context id|.
1. Let |top-level context| be the [=top-level browsing context=] for |context|.
@@ -1804,7 +1804,14 @@ The [=remote end steps=] with |session| and command parameters
## The browsingContext Module ## {#module-browsingContext}
The browsingContext module contains commands and
-events relating to browsing contexts.
+events relating to [=navigables=].
+
+Note: For historic reasons this module is called browsingContext
+and the protocol uses context
to refer to navigables, particuarly
+as a field in command and response parameters.
+
+Issue: Update the spec to consistently use [=navigable=] consistently and remove
+uses of [=/browsing context=].
The progress of navigation is communicated using an immutable WebDriver
navigation status struct, which has the following items:
@@ -1880,23 +1887,54 @@ BrowsingContextEvent = (
browsingContext.BrowsingContext = text;
-Each [=/browsing context=] has an associated browsing context
-id, which is a string uniquely identifying that browsing context. This is
-implicitly set when the context is created. For browsing contexts with an
-associated WebDriver [=window handle=] the [=/browsing context id=] must be the
-same as the [=window handle=].
+A [=/navigable=] is associated with a context id, which is a
+string uniquely identifying that browsing context within a specific [=bidi
+session=].
+
+A [=BiDi session=] has a context id map which is a weak map between
+[=navigables=] and their corresponding [=context id=]. When the session is
+created this map is empty.
browsingContext.NavigationInfo
type provides details of an ongoing navigation.
context
"] field.
+The [=remote end steps=] with |session| and |command parameters| are:
-1. Let |context| be the result of [=trying=] to [=get a browsing context=] with |context id|.
+1. Let |context| be the result of [=trying=] to [=get a browsing context=] with
+ |session| and |command parameters|["context
"].
-1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=].
+1. If |context| is not a [=top-level browsing context=], return [=error=] with
+ [=error code=] [=invalid argument=].
1. Return [=activate a context=] with |context|.
@@ -2367,12 +2416,10 @@ To render viewport to a canvas given |viewport| and |rect|:
context
"].
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"]..
1. If the implementation is unable to capture a screenshot of |context| for any
reason then return [=error=] with [=error code=] [=unsupported operation=].
@@ -2477,13 +2524,10 @@ The browsingContext.close command closes a
context
field of
- |command parameters|.
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Assert: |context| is not null.
@@ -2535,7 +2579,7 @@ The browsingContext.create command creates a new
type
field of
|command parameters|.
@@ -2544,7 +2588,7 @@ The [=remote end steps=] with |command parameters| are:
field of |command parameters|, if present, or null otherwise.
1. If |reference context id| is not null, let |reference context| be the
- result of [=trying=] to [=get a browsing context=] with
+ result of [=trying=] to [=get a browsing context=] with |session| and
|reference context id|. Otherwise let |reference context| be null.
1. If |reference context| is not null and is not a [=top-level browsing context=],
@@ -2587,8 +2631,8 @@ The [=remote end steps=] with |command parameters| are:
Note: Do not invoke the [=/focusing steps=] for the created browsing context if background
is true.
- 1. Let |context id| be the [=browsing context id=] of the newly created
- [=/browsing context=].
+ 1. Let |context id| be the result of [=trying=] to [=get context id= with
+ |session| and the newly created [=/browsing context=].
1. Let |body| be a [=/map=] matching the browsingContext.CreateResult
production, with the context
field set to |context id|.
@@ -2629,7 +2673,7 @@ or all top-level contexts when no parent is provided.
root
field of
|command parameters| if present, or null otherwise.
@@ -2640,7 +2684,7 @@ The [=remote end steps=] with session and |command parameters|
1. Let |contexts| be an empty [=/list=].
1. If |root id| is not null, append the result of [=trying=] to
- [=get a browsing context=] given |root id| to |contexts|.
+ [=get a browsing context=] with |session| and |root id| to |contexts|.
Otherwise append all [=top-level browsing contexts=] to |contexts|.
1. Let |contexts info| be an empty [=/list=].
@@ -2648,7 +2692,7 @@ The [=remote end steps=] with session and |command parameters|
1. For each |context| of |contexts|:
1. Let |info| be the result of [=get the browsing context info=] given
- |context|, |max depth|, and true.
+ |session|, |context|, |max depth|, and true.
1. Append |info| to |contexts info|
@@ -2690,13 +2734,10 @@ command allows closing an open prompt
context
field of
- |command parameters|.
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Let |accept| be the value of the accept
field of |command
parameters| if present, or true otherwise.
@@ -2758,13 +2799,10 @@ browsing context to the given URL.
context
field of
- |command parameters|.
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Assert: |context| is not null.
@@ -2843,13 +2881,10 @@ PDF document represented as a Base64-encoded string.
-The [=remote end steps=] with session and |command parameters| are:
-
-1. Let |context id| be the value of the context
field of
- |command parameters|.
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. If the implementation is unable to provide a paginated representation of
|context| for any reason then return [=error=] with [=error code=]
@@ -2970,13 +3005,10 @@ browsing context.
context
field of
- |command parameters|.
+The [=remote end steps=] with |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Assert: |context| is not null.
@@ -3032,11 +3064,10 @@ The browsingContext.setViewport command specific
context
"] field.
+The [=remote end steps=] with |session| and |command parameters| are:
-1. Let |context| be the result of [=trying=] to [=get a browsing context=] with |context id|.
+1. Let |context| be the result of [=trying=] to [=get a browsing context=] with
+ |session| and |command parameters|["context
"].
1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=].
@@ -3088,7 +3119,7 @@ To Recursively emit context created events given |session| and |conte
To Emit a context created event given |session| and |context|:
1. Let |params| be the result of [=get the browsing context info=] given
- |context|, 0, and true.
+ |session|, |context|, 0, and true.
1. Let |body| be a [=/map=] matching the
browsingContext.ContextCreated
production, with the
@@ -3149,13 +3180,6 @@ Define the following [=browsing context tree discarded=] steps:
1. Let |context| be the browsing context being discarded.
-1. Let |params| be the result of [=get the browsing context info=], given
- |context|, 0, and true.
-
-1. Let |body| be a [=/map=] matching the
- browsingContext.ContextDestroyed
production, with the
- params
field set to |params|.
-
1. Let |related browsing contexts| be a [=/set=] containing the result of
[=get the parent browsing context=] with |context|, if that is not
null, or an empty [=/set=] otherwise.
@@ -3164,6 +3188,13 @@ Define the following [=browsing context tree discarded=] steps:
given "browsingContext.contextDestroyed
" and |related browsing
contexts|:
+ 1. Let |params| be the result of [=get the browsing context info=], given
+ |session|, |context|, 0, and true.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.ContextDestroyed
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
Issue: the way this hooks into HTML feels very fragile. See https://github.com/whatwg/html/issues/6194
@@ -3191,23 +3222,23 @@ become inaccessible but not yet get discarded because bfcache.
The [=remote end event trigger=] is the WebDriver BiDi navigation
started steps given |context| and |navigation status|:
-1. Let |params| be the result of [=get the navigation info=] given |context|
- and |navigation status|.
-
- 1. Let |body| be a [=/map=] matching the
- browsingContext.NavigationStarted
production, with the
- params
field set to |params|.
-
1. Let |navigation id| be |navigation status|'s id.
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. [=Resume=] with "navigation started
", |navigation id|, and
|navigation status|.
+1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.navigationStarted
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|,
+ |context| and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.NavigationStarted
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.FragmentNavigated
production, with the
- params
field set to |params|.
-
1. Let |navigation id| be |navigation status|'s id.
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. [=Resume=] with "fragment navigated
", |navigation id|, and
|navigation status|.
+1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.fragmentNavigated
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|,
+ |context| and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.FragmentNavigated
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.DomContentLoaded
production, with the
- params
field set to |params|.
-
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. Let |navigation id| be |navigation status|'s id.
1. [=Resume=] with "domContentLoaded
", |navigation id|, and
|navigation status|.
+1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.domContentLoaded
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|, |context|
+ and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.DomContentLoaded
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.Load
- production, with the params
field set to |params|.
-
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. Let |navigation id| be |navigation status|'s id.
1. [=Resume=] with "load
", |navigation id| and
|navigation status|.
+1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.load
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|,
+ |context| and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the browsingContext.Load
+ production, with the params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.DownloadWillBegin
production, with the
- params
field set to |params|.
-
1. Let |navigation id| be |navigation status|'s id.
- 1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. [=Resume=] with "download started
", |navigation id|, and |navigation status|.
+ 1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.downloadWillBegin
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|, |context|
+ and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.DownloadWillBegin
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.NavigationAborted
production, with the
- params
field set to |params|.
-
1. Let |navigation id| be |navigation status|'s id.
1. Let |related browsing contexts| be a [=/set=] containing |context|.
@@ -3400,6 +3424,13 @@ aborted steps given |context| and |navigation status|:
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.navigationAborted
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |session|,
+ |context| and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.NavigationAborted
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.NavigationFailed
production, with the
- params
field set to |params|.
-
1. Let |navigation id| be |navigation status|'s id.
-1. Let |related browsing contexts| be a [=/set=] containing |context|.
-
1. [=Resume=] with "navigation failed
", |navigation id|, and |navigation status|.
+1. Let |related browsing contexts| be a [=/set=] containing |context|.
+
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.navigationFailed
" and |related browsing contexts|:
+ 1. Let |params| be the result of [=get the navigation info=] given |context|
+ and |navigation status|.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.NavigationFailed
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.UserPromptClosedParameters
production with the
- context
field set to |context id|, the accepted
- field set to |accepted|, and the userText
field set to |user
- text| if |user text| is not null or omitted otherwise.
-
-1. Let |body| be a [=/map=] matching the
- BrowsingContextUserPromptClosedEvent
production, with the
- params
field set to |params|.
-
1. Let |related browsing contexts| be a [=/set=] containing |context|.
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.userPromptClosed
" and |related browsing contexts|:
+ 1. Let |context id result| be [=get context id=] with |session| and |context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
+
+ 1. Let |params| be a [=/map=] matching the
+ browsingContext.UserPromptClosedParameters
production with the
+ context
field set to |context id|, the accepted
+ field set to |accepted|, and the userText
field set to |user
+ text| if |user text| is not null or omitted otherwise.
+
+ 1. Let |body| be a [=/map=] matching the
+ BrowsingContextUserPromptClosedEvent
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
browsingContext.UserPromptOpenedParameters
production with the
- context
field set to |context id|, the type
field
- set to |type|, the message
field set to |message|, and the
- defaultValue
field set to |default value| if |default value| is
- not null or omitted otherwise.
-
-1. Let |body| be a [=/map=] matching the
- browsingContext.UserPromptOpened
production, with the
- params
field set to |params|.
-
1. Let |related browsing contexts| be a [=/set=] containing |context|.
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "browsingContext.userPromptOpened
" and |related browsing contexts|:
+ 1. Let |context id result| be [=get context id=] with |session| and |context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
+
+ 1. Let |params| be a [=/map=] matching the
+ browsingContext.UserPromptOpenedParameters
production with the
+ context
field set to |context id|, the type
field
+ set to |type|, the message
field set to |message|, and the
+ defaultValue
field set to |default value| if |default value| is
+ not null or omitted otherwise.
+
+ 1. Let |body| be a [=/map=] matching the
+ browsingContext.UserPromptOpened
production, with the
+ params
field set to |params|.
+
1. [=Emit an event=] with |session| and |body|.
contexts
does not [=list/contains|contain=] |context id|, return.
@@ -6480,7 +6531,7 @@ To get the browsing context with given |realm|:
Document
.
+
1. Let |browsing context| be |document|'s [=/browsing context=].
- 1. Let |context id| be the [=browsing context id=] for |browsing context|.
+
+ 1. Let |context id result| be the [=get context id=] with |session| and |browsing context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
+
1. Let |realm info| be a [=/map=] matching the script.WindowRealmInfo
production,
with the realm
field set to |realm id|, the origin
field set to |origin|, and the context
field set to |context id|.
@@ -6509,11 +6568,21 @@ To get the realm info given |environment settings|:
1. Let |document| be |global object|'s wrapped {{Window}}'s
associated Document
.
+
1. Let |browsing context| be |document|'s [=/browsing context=].
- 1. Let |context id| be the [=browsing context id=] for |browsing context|.
+
+ 1. Let |context id result| be [=get context id=] with |session| and |browsing context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
+
1. Let |sandbox name| be the result of [=get a sandbox name=] given
|realm|.
+
1. Assert: |sandbox name| is not null.
+
1. Let |realm info| be a [=/map=] matching the script.WindowRealmInfo
production,
with the realm
field set to |realm id|, the origin
field set to |origin|, the context
field set to |context id|,
@@ -7245,7 +7314,12 @@ an |ownership type|, a |serialization internal map|, a |realm| and a |session|:
1. Let |browsing context| be |window|'s [=Window/browsing context=].
- 1. Let |context id| be the [=browsing context id=] for |browsing context|.
+ 1. Let |context id result| be [=get context id=] with |session| and |browsing context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
1. Let |serialized| be a [=/map=] matching the
script.WindowProxyProperties
production in the [=local end
@@ -7556,7 +7630,7 @@ an optional browsingContext.BrowsingContext
in which a
script related event occurred.
script.ContextTarget
production:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |target|["context
"].
+ with |session| and |target|["context
"].
1. If |target| does not contain a field named "sandbox
", or
|target|["sandbox
"] is an empty string:
@@ -7687,15 +7767,18 @@ The [=remote end steps=] given |session| and |command parameters| are:
1. Let |arguments| be the arguments
field of |command
parameters| if present, or an empty [=/list=] otherwise.
-1. Let the |contexts| be the value of the contexts
field of |command parameters| if it is present or null if it isn’t.
+1. Let the |contexts| be the value of the contexts
field of
+ |command parameters| if it is present or null if it isn’t.
1. If |contexts| is not null:
1. For each |context id| of |contexts|:
- 1. Let |context| be the result of [=trying=] to [=get a browsing context=] with |context id|.
+ 1. Let |context| be the result of [=trying=] to [=get a browsing context=]
+ with |session| and |context id|.
- 1. If |context| is not a [=top-level browsing context=], return [=error=] with [=error code=] [=invalid argument=].
+ 1. If |context| is not a [=top-level browsing context=], return [=error=]
+ with [=error code=] [=invalid argument=].
1. Let |sandbox| be the value of the "sandbox
" field in |command
parameters|, if present, or null otherwise.
@@ -7744,10 +7827,10 @@ other handles or strong ECMAScript references.
target
field of |command parameters|.
+ with |session| and |command parameters|["target
"].
1. Let |handles| the value of the handles
field of |command parameters|.
@@ -7848,7 +7931,7 @@ Note: the |function declaration| is parenthesized and evaluated.
The [=remote end steps=] with |session| and |command parameters| are:
1. Let |realm| be the result of [=trying=] to [=get a realm from a target=]
- given the value of the target
field of |command parameters|.
+ with |session| and |command parameters|["target
"].
1. Let |realm id| be |realm|'s [=realm id=].
@@ -7991,7 +8074,7 @@ that likely isn't what clients want.
The [=remote end steps=] given |session| and |command parameters| are:
1. Let |realm| be the result of [=trying=] to [=get a realm from a target=]
- given the value of the target
field of |command parameters|.
+ with |session| and |command parameters|["target
"].
1. Let |realm id| be |realm|'s [=realm id=].
@@ -8086,7 +8169,7 @@ realm associated with the [=document=] currently loaded in a specified
context
:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |command parameters|["context
"].
+ with |session| and |command parameters|["context
"].
1. Let |document| be |context|'s [=active document=].
@@ -8118,7 +8201,8 @@ The [=remote end steps=] with session and |command parameters|
1. For each |settings| of |environment settings|:
- 1. Let |realm info| be the result of [=get the realm info=] given |settings|
+ 1. Let |realm info| be the result of [=get the realm info=] given |session|
+ and |settings|
1. If |command parameters| contains type
and |realm
info|["type
"] is not equal to |command
@@ -8234,7 +8318,7 @@ given |session|, |realm|, |channel properties|, and |message|:
|message|, |serialization options|, |ownership type|, a new [=/map=] as serialization
internal map and |realm|.
- 1. Let |source| be the [=get the source=] with |realm|.
+ 1. Let |source| be the [=get the source=] with |session| and |realm|.
1. Let |params| be a [=/map=] matching the
script.MessageParameters
production, with the
@@ -8274,20 +8358,20 @@ object:
1. Let |environment settings| be the newly created [=environment settings
object=].
-1. Let |realm info| be the result of [=get the realm info=] given
- |environment settings|.
-
-1. If |realm info| is null, return.
-
1. Let |related browsing contexts| be the result of [=get related browsing
contexts=] given |environment settings|.
-1. Let |body| be a [=/map=] matching the script.RealmCreated
- production, with the params
field set to |realm info|.
-
1. For each |session| in the [=set of sessions for which an event is enabled=]
given "script.realmCreated
" and |related browsing contexts|:
+ 1. Let |realm info| be the result of [=get the realm info=] given
+ |session| and |environment settings|.
+
+ 1. If |realm info| is null, continue.
+
+ 1. Let |body| be a [=/map=] matching the script.RealmCreated
+ production, with the params
field set to |realm info|.
+
1. [=Emit an event=] with |session| and |body|.
script.RealmCreated
production, with the params
field set to |realm info|.
@@ -8441,7 +8526,14 @@ To buffer a log event given |session|, |contexts| and |event|:
1. For each |context| of |contexts|:
- 1. Append the [=browsing context id=] for |context| to |context ids|.
+ 1. Let |context id result| be [=get context id=] with |session| to and |context|.
+
+ 1. Assert: |context id result| is not [=error=]. This would imply that the browsing
+ context doesn't have an active document.
+
+ 1. Set |context id| to |context id result|'s data.
+
+ 1. [=list/Append=] |context id| to |context ids|.
1. For each |context id| in |context ids|:
@@ -8593,7 +8685,8 @@ Define the following [=console steps=] with |method|, |args|, and
1. Add |serialized arg| to |serialized args|.
- 1. Let |source| be the result of [=get the source=] given [=current Realm Record=].
+ 1. Let |source| be the result of [=get the source=] with |session| and
+ [=current Realm Record=].
1. If |method| is "assert
", "error
",
"trace
", or "warn
", let |stack| be the [=current
@@ -8632,18 +8725,20 @@ ignore>line number, column number, |message| and
1. Let |stack| be the [=stack trace for an exception=] with the exception
corresponding to the error being reported.
-1. Let |source| be the result of [=get the source=] given [=current Realm Record=].
-
-1. Let |entry| be a [=/map=] matching the log.JavascriptLogEntry
production,
- with level
set to "error
", text
set to
- |message|, source
set to |source|, and the timestamp
- field set to |timestamp|.
-
1. Let |related browsing contexts| be the result of [=get related browsing
contexts=] given |settings|.
1. For each |session| in [=active BiDi sessions=]:
+ 1. Let |source| be the result of [=get the source=] given |session| and
+ [=current Realm Record=].
+
+ 1. Let |entry| be a [=/map=] matching the log.JavascriptLogEntry
production,
+ with level
set to "error
", text
set to
+ |message|, source
set to |source|, and the timestamp
+ field set to |timestamp|.
+
+
1. If [=event is enabled=] with |session|, "log.entryAdded
" and
|related browsing contexts|, [=emit an event=] with |session| and |body|.
@@ -8920,11 +9015,8 @@ specified sequence of user input actions.
The [=remote end steps=] with |session| and |command parameters| are:
-1. Let |context id| be the value of the context
field of
- |command parameters|.
-
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Let |input state| be [=get the input state=] with |session| and |context|'s
[=top-level browsing context=].
@@ -8973,13 +9065,10 @@ state associated with the current session.
context
field of
- |command parameters|.
+The [=remote end steps=] given |session| and |command parameters| are:
1. Let |context| be the result of [=trying=] to [=get a browsing context=]
- with |context id|.
+ with |session| and |command parameters|["context
"].
1. Let |top-level context| be |context|'s [=top-level browsing context=].