@@ -136,6 +136,7 @@ spec: ECMASCRIPT-I18N; urlPrefix: https://tc39.es/ecma402/
136
136
spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
137
137
type: dfn
138
138
text: Array; url: sec-array-objects
139
+ text: AvailableNamedTimeZoneIdentifiers; url: sec-availablenamedtimezoneidentifiers
139
140
text: Await; url: await
140
141
text: BigInt; url: sec-bigint-constructor
141
142
text: Call; url: sec-call
@@ -158,6 +159,7 @@ spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
158
159
text: IsCallable; url: sec-iscallable
159
160
text: IsPromise; url: sec-ispromise
160
161
text: IsRegExp; url: sec-isregexp
162
+ text: IsTimeZoneOffsetString; url: sec-istimezoneoffsetstring
161
163
text: IteratorToList; url: sec-iteratortolist
162
164
text: LengthOfArrayLike; url: sec-lengthofarraylike
163
165
text: Map; url: #sec-map-iterable; for: constructor
@@ -170,6 +172,7 @@ spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
170
172
text: String; url: sec-string-constructor
171
173
text: StringToBigInt; url: sec-stringtobigint
172
174
text: StringToNumber; url: sec-stringtonumber
175
+ text: SystemTimeZoneIdentifier; url: sec-systemtimezoneidentifier
173
176
text: ToString; url: sec-tostring
174
177
text: Type; url: sec-ecmascript-data-types-and-values
175
178
text: abrupt completion; url: sec-completion-record-specification-type
@@ -3133,6 +3136,9 @@ A [=remote end=] has a <dfn>viewport overrides map</dfn> which is a weak map bet
3133
3136
A [=remote end=] has a <dfn>locale overrides map</dfn> which is a weak map between
3134
3137
[=navigables=] or [=user contexts=] and string or null.
3135
3138
3139
+ A [=remote end=] has a <dfn>timezone overrides map</dfn> which is a weak map between
3140
+ [=navigables=] or [=user contexts=] and string or null.
3141
+
3136
3142
A [=remote end=] has an <dfn>unhandled prompt behavior overrides map</dfn> which is a
3137
3143
weak map between [=user contexts=] and [=unhandled prompt behavior struct=] .
3138
3144
@@ -5808,7 +5814,8 @@ relating to emulation of browser APIs.
5808
5814
EmulationCommand = (
5809
5815
emulation.SetGeolocationOverride //
5810
5816
emulation.SetLocaleOverride //
5811
- emulation.SetScreenOrientationOverride
5817
+ emulation.SetScreenOrientationOverride //
5818
+ emulation.SetTimezoneOverride
5812
5819
)
5813
5820
</pre>
5814
5821
@@ -5975,14 +5982,13 @@ The [=DefaultLocale=] algorithm is implementation defined. A WebDriver-BiDi
5975
5982
5976
5983
1. Let |realm| be [=current Realm Record=] .
5977
5984
5978
- 1. Let |global object| be |realm|'s [=realm/global object=] .
5979
-
5980
- 1. If |global object| implements {{WindowProxy}} :
5985
+ 1. Let |environment settings| be the [=environment settings object=] whose
5986
+ [=realm execution context=] 's Realm component is |realm|.
5981
5987
5982
- 1. Let |window | be the value of |global object|'s \ [[WindowProxy]]
5983
- [=internal slot=] .
5988
+ 1. Let |related navigables | be the result of [=get related navigables=] given
5989
+ |environment settings| .
5984
5990
5985
- 1. Let |navigable| be |window|'s [=window/navigable=] .
5991
+ 1. For each |navigable| of |related navigables|:
5986
5992
5987
5993
1. Let |top-level traversable| be |navigable|’s
5988
5994
[=navigable/top-level traversable=] .
@@ -6181,6 +6187,127 @@ The [=remote end steps=] with |command parameters| are:
6181
6187
6182
6188
</div>
6183
6189
6190
+ #### The emulation.setTimezoneOverride Command #### {#command-emulation-setTimezoneOverride}
6191
+
6192
+ The <dfn export for=commands>emulation.setTimezoneOverride</dfn> command modifies
6193
+ timezone on the given top-level traversables or user contexts.
6194
+
6195
+ <dl>
6196
+ <dt> Command Type</dt>
6197
+ <dd>
6198
+ <pre class="cddl" data-cddl-module="remote-cddl">
6199
+ emulation.SetTimezoneOverride = (
6200
+ method: "emulation.setTimezoneOverride",
6201
+ params: emulation.SetTimezoneOverrideParameters
6202
+ )
6203
+
6204
+ emulation.SetTimezoneOverrideParameters = {
6205
+ timezone: text / null,
6206
+ ? contexts: [+browsingContext.BrowsingContext] ,
6207
+ ? userContexts: [+browser.UserContext] ,
6208
+ }
6209
+ </pre>
6210
+ </dd>
6211
+ <dt> Result Type</dt>
6212
+ <dd>
6213
+ <code>
6214
+ EmptyResult
6215
+ </code>
6216
+ </dd>
6217
+ </dl>
6218
+
6219
+ <div algorithm="updated SystemTimeZoneIdentifier steps">
6220
+ The [=SystemTimeZoneIdentifier=] algorithm is implementation defined. A
6221
+ WebDriver-BiDi [=remote end=] must have an implementation that runs the following
6222
+ steps:
6223
+
6224
+ 1. Let |emulated timezone| be null.
6225
+
6226
+ 1. Let |realm| be [=current Realm Record=] .
6227
+
6228
+ 1. Let |environment settings| be the [=environment settings object=] whose
6229
+ [=realm execution context=] 's Realm component is |realm|.
6230
+
6231
+ 1. Let |related navigables| be the result of [=get related navigables=] given
6232
+ |environment settings|.
6233
+
6234
+ 1. For each |navigable| of |related navigables|:
6235
+
6236
+ 1. Let |top-level traversable| be |navigable|’s
6237
+ [=navigable/top-level traversable=] .
6238
+
6239
+ 1. Let |user context| be |top-level traversable|'s [=associated user context=] .
6240
+
6241
+ 1. If [=timezone overrides map=] [=map/contains=] |top-level traversable|, set
6242
+ |emulated timezone| to [=timezone overrides map=] [|top-level traversable|] .
6243
+
6244
+ 1. Otherwise, if [=timezone overrides map=] [=map/contains=]
6245
+ |user context|, set |emulated timezone| to
6246
+ [=timezone overrides map=] [|user context|] .
6247
+
6248
+ 1. If |emulated timezone| is not null, return |emulated timezone|.
6249
+
6250
+ 1. Return the result of implementation-defined steps in accordance with the
6251
+ requirements of the [=SystemTimeZoneIdentifier=] specification.
6252
+
6253
+ </div>
6254
+
6255
+ <div algorithm="remote end steps for emulation.setTimezoneOverride">
6256
+
6257
+ The [=remote end steps=] with |command parameters| are:
6258
+
6259
+ 1. If |command parameters| [=map/contains=] "<code> userContexts</code> "
6260
+ and |command parameters| [=map/contains=] "<code> context</code> ",
6261
+ return [=error=] with [=error code=] [=invalid argument=] .
6262
+
6263
+ 1. If |command parameters| doesn't [=map/contain=] "<code> userContexts</code> "
6264
+ and |command parameters| doesn't [=map/contain=] "<code> context</code> ",
6265
+ return [=error=] with [=error code=] [=invalid argument=] .
6266
+
6267
+ 1. Let |emulated timezone| be null.
6268
+
6269
+ 1. If |command parameters| [=map/contains=] "<code> timezone</code> ":
6270
+
6271
+ 1. Set |emulated timezone| to |command parameters|["<code>timezone</code>"] .
6272
+
6273
+ 1. If [=IsTimeZoneOffsetString=] (|emulated timezone|) returns false and
6274
+ [=AvailableNamedTimeZoneIdentifiers=] does not [=list/contain=]
6275
+ |emulated timezone|, return [=error=] with [=error code=] [=invalid argument=] .
6276
+
6277
+ 1. Let |navigables| be a [=/set=] .
6278
+
6279
+ 1. If the <code> contexts</code> field of |command parameters| is present:
6280
+
6281
+ 1. Let |navigables| be the result of [=trying=] to
6282
+ [=get valid top-level traversables by ids=] with
6283
+ |command parameters|["<code>contexts</code>"] .
6284
+
6285
+ 1. Otherwise:
6286
+
6287
+ 1. Assert the <code> userContexts</code> field of |command parameters| is present.
6288
+
6289
+ 1. Let |user contexts| be the result of [=trying=] to [=get valid user contexts=]
6290
+ with |command parameters|["<code>userContexts</code>"] .
6291
+
6292
+ 1. For each |user context| of |user contexts|:
6293
+
6294
+ 1. [=map/Set=] [=timezone overrides map=] [|user context|] to
6295
+ |emulated timezone|.
6296
+
6297
+ 1. [=list/For each=] |top-level traversable| of the list of all
6298
+ [=/top-level traversables=] whose [=associated user context=] is
6299
+ |user context|:
6300
+
6301
+ 1. [=list/Append=] |top-level traversable| to |navigables|.
6302
+
6303
+ 1. For each |navigable| of |navigables|:
6304
+
6305
+ 1. [=map/Set=] [=timezone overrides map=] [|navigable|] to |emulated timezone|.
6306
+
6307
+ 1. Return [=success=] with data null.
6308
+
6309
+ </div>
6310
+
6184
6311
## The network Module ## {#module-network}
6185
6312
6186
6313
The <dfn export for=modules>network</dfn> module contains commands and events
0 commit comments