File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed
protocol-parser/generated Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -316,6 +316,10 @@ export class CommandProcessor extends EventEmitter<CommandProcessorEventsMap> {
316
316
return await this . #emulationProcessor. setGeolocationOverride (
317
317
this . #parser. parseSetGeolocationOverrideParams ( command . params ) ,
318
318
) ;
319
+ case 'emulation.setLocaleOverride' :
320
+ throw new UnknownErrorException (
321
+ `Method ${ command . method } is not implemented.` ,
322
+ ) ;
319
323
case 'emulation.setScreenOrientationOverride' :
320
324
return await this . #emulationProcessor. setScreenOrientationOverride (
321
325
this . #parser. parseSetScreenOrientationOverrideParams ( command . params ) ,
Original file line number Diff line number Diff line change @@ -1213,6 +1213,7 @@ export namespace BrowsingContext {
1213
1213
export const EmulationCommandSchema = z . lazy ( ( ) =>
1214
1214
z . union ( [
1215
1215
Emulation . SetGeolocationOverrideSchema ,
1216
+ Emulation . SetLocaleOverrideSchema ,
1216
1217
Emulation . SetScreenOrientationOverrideSchema ,
1217
1218
] ) ,
1218
1219
) ;
@@ -1273,6 +1274,26 @@ export namespace Emulation {
1273
1274
} ) ,
1274
1275
) ;
1275
1276
}
1277
+ export namespace Emulation {
1278
+ export const SetLocaleOverrideSchema = z . lazy ( ( ) =>
1279
+ z . object ( {
1280
+ method : z . literal ( 'emulation.setLocaleOverride' ) ,
1281
+ params : Emulation . SetLocaleOverrideParametersSchema ,
1282
+ } ) ,
1283
+ ) ;
1284
+ }
1285
+ export namespace Emulation {
1286
+ export const SetLocaleOverrideParametersSchema = z . lazy ( ( ) =>
1287
+ z . object ( {
1288
+ locale : z . union ( [ z . string ( ) , z . null ( ) ] ) ,
1289
+ contexts : z
1290
+ . array ( BrowsingContext . BrowsingContextSchema )
1291
+ . min ( 1 )
1292
+ . optional ( ) ,
1293
+ userContexts : z . array ( Browser . UserContextSchema ) . min ( 1 ) . optional ( ) ,
1294
+ } ) ,
1295
+ ) ;
1296
+ }
1276
1297
export namespace Emulation {
1277
1298
export const SetScreenOrientationOverrideSchema = z . lazy ( ( ) =>
1278
1299
z . object ( {
Original file line number Diff line number Diff line change @@ -975,6 +975,7 @@ export namespace BrowsingContext {
975
975
}
976
976
export type EmulationCommand =
977
977
| Emulation . SetGeolocationOverride
978
+ | Emulation . SetLocaleOverride
978
979
| Emulation . SetScreenOrientationOverride ;
979
980
export namespace Emulation {
980
981
export type SetGeolocationOverride = {
@@ -1043,6 +1044,22 @@ export namespace Emulation {
1043
1044
type : 'positionUnavailable' ;
1044
1045
} ;
1045
1046
}
1047
+ export namespace Emulation {
1048
+ export type SetLocaleOverride = {
1049
+ method : 'emulation.setLocaleOverride' ;
1050
+ params : Emulation . SetLocaleOverrideParameters ;
1051
+ } ;
1052
+ }
1053
+ export namespace Emulation {
1054
+ export type SetLocaleOverrideParameters = {
1055
+ locale : string | null ;
1056
+ contexts ?: [
1057
+ BrowsingContext . BrowsingContext ,
1058
+ ...BrowsingContext . BrowsingContext [ ] ,
1059
+ ] ;
1060
+ userContexts ?: [ Browser . UserContext , ...Browser . UserContext [ ] ] ;
1061
+ } ;
1062
+ }
1046
1063
export namespace Emulation {
1047
1064
export type SetScreenOrientationOverride = {
1048
1065
method : 'emulation.setScreenOrientationOverride' ;
You can’t perform that action at this time.
0 commit comments