devtools-protocol 0.0.1103117 → 0.0.1105486

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16436,6 +16436,18 @@
16436
16436
  "ActivatedDuringMainFrameNavigation",
16437
16437
  "PreloadingUnsupportedByWebContents"
16438
16438
  ]
16439
+ },
16440
+ {
16441
+ "id": "PrefetchStatus",
16442
+ "description": "List of Prefetch status, which refers to PreloadingTriggeringOutcome.",
16443
+ "type": "string",
16444
+ "enum": [
16445
+ "Running",
16446
+ "Ready",
16447
+ "Success",
16448
+ "Failure",
16449
+ "NotSupported"
16450
+ ]
16439
16451
  }
16440
16452
  ],
16441
16453
  "commands": [
@@ -18036,6 +18048,26 @@
18036
18048
  }
18037
18049
  ]
18038
18050
  },
18051
+ {
18052
+ "name": "prefetchStatusUpdated",
18053
+ "description": "TODO(crbug/1384419): Create a dedicated domain for preloading.\nFired when a prefetch attempt is updated.",
18054
+ "experimental": true,
18055
+ "parameters": [
18056
+ {
18057
+ "name": "initiatingFrameId",
18058
+ "description": "The frame id of the frame initiating prefetch.",
18059
+ "$ref": "FrameId"
18060
+ },
18061
+ {
18062
+ "name": "prefetchUrl",
18063
+ "type": "string"
18064
+ },
18065
+ {
18066
+ "name": "status",
18067
+ "$ref": "PrefetchStatus"
18068
+ }
18069
+ ]
18070
+ },
18039
18071
  {
18040
18072
  "name": "loadEventFired",
18041
18073
  "parameters": [
@@ -22763,6 +22795,152 @@
22763
22795
  "description": "Disables the Media domain."
22764
22796
  }
22765
22797
  ]
22798
+ },
22799
+ {
22800
+ "domain": "DeviceAccess",
22801
+ "experimental": true,
22802
+ "types": [
22803
+ {
22804
+ "id": "RequestId",
22805
+ "description": "Device request id.",
22806
+ "type": "string"
22807
+ },
22808
+ {
22809
+ "id": "DeviceId",
22810
+ "description": "A device id.",
22811
+ "type": "string"
22812
+ },
22813
+ {
22814
+ "id": "PromptDevice",
22815
+ "description": "Device information displayed in a user prompt to select a device.",
22816
+ "type": "object",
22817
+ "properties": [
22818
+ {
22819
+ "name": "id",
22820
+ "$ref": "DeviceId"
22821
+ },
22822
+ {
22823
+ "name": "name",
22824
+ "description": "Display name as it appears in a device request user prompt.",
22825
+ "type": "string"
22826
+ }
22827
+ ]
22828
+ }
22829
+ ],
22830
+ "commands": [
22831
+ {
22832
+ "name": "enable",
22833
+ "description": "Enable events in this domain."
22834
+ },
22835
+ {
22836
+ "name": "disable",
22837
+ "description": "Disable events in this domain."
22838
+ },
22839
+ {
22840
+ "name": "selectPrompt",
22841
+ "description": "Select a device in response to a DeviceAccess.deviceRequestPrompted event.",
22842
+ "parameters": [
22843
+ {
22844
+ "name": "id",
22845
+ "$ref": "RequestId"
22846
+ },
22847
+ {
22848
+ "name": "deviceId",
22849
+ "$ref": "DeviceId"
22850
+ }
22851
+ ]
22852
+ },
22853
+ {
22854
+ "name": "cancelPrompt",
22855
+ "description": "Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.",
22856
+ "parameters": [
22857
+ {
22858
+ "name": "id",
22859
+ "$ref": "RequestId"
22860
+ }
22861
+ ]
22862
+ }
22863
+ ],
22864
+ "events": [
22865
+ {
22866
+ "name": "deviceRequestPrompted",
22867
+ "description": "A device request opened a user prompt to select a device. Respond with the\nselectPrompt or cancelPrompt command.",
22868
+ "parameters": [
22869
+ {
22870
+ "name": "id",
22871
+ "$ref": "RequestId"
22872
+ },
22873
+ {
22874
+ "name": "devices",
22875
+ "type": "array",
22876
+ "items": {
22877
+ "$ref": "PromptDevice"
22878
+ }
22879
+ }
22880
+ ]
22881
+ }
22882
+ ]
22883
+ },
22884
+ {
22885
+ "domain": "Preload",
22886
+ "experimental": true,
22887
+ "types": [
22888
+ {
22889
+ "id": "RuleSetId",
22890
+ "description": "Unique id",
22891
+ "type": "string"
22892
+ },
22893
+ {
22894
+ "id": "RuleSet",
22895
+ "description": "Corresponds to SpeculationRuleSet",
22896
+ "type": "object",
22897
+ "properties": [
22898
+ {
22899
+ "name": "id",
22900
+ "$ref": "RuleSetId"
22901
+ },
22902
+ {
22903
+ "name": "loaderId",
22904
+ "description": "Identifies a document which the rule set is associated with.",
22905
+ "$ref": "Network.LoaderId"
22906
+ },
22907
+ {
22908
+ "name": "sourceText",
22909
+ "description": "Source text of JSON representing the rule set. If it comes from\n<script> tag, it is the textContent of the node. Note that it is\na JSON for valid case.\n\nSee also:\n- https://wicg.github.io/nav-speculation/speculation-rules.html\n- https://github.com/WICG/nav-speculation/blob/main/triggers.md",
22910
+ "type": "string"
22911
+ }
22912
+ ]
22913
+ }
22914
+ ],
22915
+ "commands": [
22916
+ {
22917
+ "name": "enable"
22918
+ },
22919
+ {
22920
+ "name": "disable"
22921
+ }
22922
+ ],
22923
+ "events": [
22924
+ {
22925
+ "name": "ruleSetUpdated",
22926
+ "description": "Upsert. Currently, it is only emitted when a rule set added.",
22927
+ "parameters": [
22928
+ {
22929
+ "name": "ruleSet",
22930
+ "$ref": "RuleSet"
22931
+ }
22932
+ ]
22933
+ },
22934
+ {
22935
+ "name": "ruleSetRemoved",
22936
+ "parameters": [
22937
+ {
22938
+ "name": "id",
22939
+ "$ref": "RuleSetId"
22940
+ }
22941
+ ]
22942
+ }
22943
+ ]
22766
22944
  }
22767
22945
  ]
22768
22946
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "devtools-protocol",
3
- "version": "0.0.1103117",
3
+ "version": "0.0.1105486",
4
4
  "description": "The Chrome DevTools Protocol JSON",
5
5
  "repository": "https://github.com/ChromeDevTools/devtools-protocol",
6
6
  "author": "The Chromium Authors",
@@ -8555,6 +8555,25 @@ domain Page
8555
8555
  # that is incompatible with prerender and has caused the cancellation of the attempt
8556
8556
  optional string disallowedApiMethod
8557
8557
 
8558
+ # List of Prefetch status, which refers to PreloadingTriggeringOutcome.
8559
+ type PrefetchStatus extends string
8560
+ enum
8561
+ Running
8562
+ Ready
8563
+ Success
8564
+ Failure
8565
+ # PreloadingTriggeringOutcome which not used by prefetch.
8566
+ NotSupported
8567
+
8568
+ # TODO(crbug/1384419): Create a dedicated domain for preloading.
8569
+ # Fired when a prefetch attempt is updated.
8570
+ experimental event prefetchStatusUpdated
8571
+ parameters
8572
+ # The frame id of the frame initiating prefetch.
8573
+ FrameId initiatingFrameId
8574
+ string prefetchUrl
8575
+ PrefetchStatus status
8576
+
8558
8577
  event loadEventFired
8559
8578
  parameters
8560
8579
  Network.MonotonicTime timestamp
@@ -10757,3 +10776,73 @@ experimental domain Media
10757
10776
 
10758
10777
  # Disables the Media domain.
10759
10778
  command disable
10779
+
10780
+ experimental domain DeviceAccess
10781
+ # Device request id.
10782
+ type RequestId extends string
10783
+
10784
+ # A device id.
10785
+ type DeviceId extends string
10786
+
10787
+ # Device information displayed in a user prompt to select a device.
10788
+ type PromptDevice extends object
10789
+ properties
10790
+ DeviceId id
10791
+ # Display name as it appears in a device request user prompt.
10792
+ string name
10793
+
10794
+ # Enable events in this domain.
10795
+ command enable
10796
+
10797
+ # Disable events in this domain.
10798
+ command disable
10799
+
10800
+ # Select a device in response to a DeviceAccess.deviceRequestPrompted event.
10801
+ command selectPrompt
10802
+ parameters
10803
+ RequestId id
10804
+ DeviceId deviceId
10805
+
10806
+ # Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
10807
+ command cancelPrompt
10808
+ parameters
10809
+ RequestId id
10810
+
10811
+ # A device request opened a user prompt to select a device. Respond with the
10812
+ # selectPrompt or cancelPrompt command.
10813
+ event deviceRequestPrompted
10814
+ parameters
10815
+ RequestId id
10816
+ array of PromptDevice devices
10817
+
10818
+ experimental domain Preload
10819
+ # Unique id
10820
+ type RuleSetId extends string
10821
+
10822
+ # Corresponds to SpeculationRuleSet
10823
+ type RuleSet extends object
10824
+ properties
10825
+ RuleSetId id
10826
+ # Identifies a document which the rule set is associated with.
10827
+ Network.LoaderId loaderId
10828
+ # Source text of JSON representing the rule set. If it comes from
10829
+ # <script> tag, it is the textContent of the node. Note that it is
10830
+ # a JSON for valid case.
10831
+ #
10832
+ # See also:
10833
+ # - https://wicg.github.io/nav-speculation/speculation-rules.html
10834
+ # - https://github.com/WICG/nav-speculation/blob/main/triggers.md
10835
+ string sourceText
10836
+
10837
+ command enable
10838
+
10839
+ command disable
10840
+
10841
+ # Upsert. Currently, it is only emitted when a rule set added.
10842
+ event ruleSetUpdated
10843
+ parameters
10844
+ RuleSet ruleSet
10845
+
10846
+ event ruleSetRemoved
10847
+ parameters
10848
+ RuleSetId id
@@ -486,6 +486,11 @@ export namespace ProtocolMapping {
486
486
  * Fired when a prerender attempt is completed.
487
487
  */
488
488
  'Page.prerenderAttemptCompleted': [Protocol.Page.PrerenderAttemptCompletedEvent];
489
+ /**
490
+ * TODO(crbug/1384419): Create a dedicated domain for preloading.
491
+ * Fired when a prefetch attempt is updated.
492
+ */
493
+ 'Page.prefetchStatusUpdated': [Protocol.Page.PrefetchStatusUpdatedEvent];
489
494
  'Page.loadEventFired': [Protocol.Page.LoadEventFiredEvent];
490
495
  /**
491
496
  * Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
@@ -704,6 +709,16 @@ export namespace ProtocolMapping {
704
709
  * list of player ids and all events again.
705
710
  */
706
711
  'Media.playersCreated': [Protocol.Media.PlayersCreatedEvent];
712
+ /**
713
+ * A device request opened a user prompt to select a device. Respond with the
714
+ * selectPrompt or cancelPrompt command.
715
+ */
716
+ 'DeviceAccess.deviceRequestPrompted': [Protocol.DeviceAccess.DeviceRequestPromptedEvent];
717
+ /**
718
+ * Upsert. Currently, it is only emitted when a rule set added.
719
+ */
720
+ 'Preload.ruleSetUpdated': [Protocol.Preload.RuleSetUpdatedEvent];
721
+ 'Preload.ruleSetRemoved': [Protocol.Preload.RuleSetRemovedEvent];
707
722
  }
708
723
 
709
724
  export interface Commands {
@@ -4591,6 +4606,42 @@ export namespace ProtocolMapping {
4591
4606
  paramsType: [];
4592
4607
  returnType: void;
4593
4608
  };
4609
+ /**
4610
+ * Enable events in this domain.
4611
+ */
4612
+ 'DeviceAccess.enable': {
4613
+ paramsType: [];
4614
+ returnType: void;
4615
+ };
4616
+ /**
4617
+ * Disable events in this domain.
4618
+ */
4619
+ 'DeviceAccess.disable': {
4620
+ paramsType: [];
4621
+ returnType: void;
4622
+ };
4623
+ /**
4624
+ * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
4625
+ */
4626
+ 'DeviceAccess.selectPrompt': {
4627
+ paramsType: [Protocol.DeviceAccess.SelectPromptRequest];
4628
+ returnType: void;
4629
+ };
4630
+ /**
4631
+ * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
4632
+ */
4633
+ 'DeviceAccess.cancelPrompt': {
4634
+ paramsType: [Protocol.DeviceAccess.CancelPromptRequest];
4635
+ returnType: void;
4636
+ };
4637
+ 'Preload.enable': {
4638
+ paramsType: [];
4639
+ returnType: void;
4640
+ };
4641
+ 'Preload.disable': {
4642
+ paramsType: [];
4643
+ returnType: void;
4644
+ };
4594
4645
  }
4595
4646
  }
4596
4647
 
@@ -102,6 +102,10 @@ export namespace ProtocolProxyApi {
102
102
 
103
103
  Media: MediaApi;
104
104
 
105
+ DeviceAccess: DeviceAccessApi;
106
+
107
+ Preload: PreloadApi;
108
+
105
109
  }
106
110
 
107
111
 
@@ -3069,6 +3073,12 @@ export namespace ProtocolProxyApi {
3069
3073
  */
3070
3074
  on(event: 'prerenderAttemptCompleted', listener: (params: Protocol.Page.PrerenderAttemptCompletedEvent) => void): void;
3071
3075
 
3076
+ /**
3077
+ * TODO(crbug/1384419): Create a dedicated domain for preloading.
3078
+ * Fired when a prefetch attempt is updated.
3079
+ */
3080
+ on(event: 'prefetchStatusUpdated', listener: (params: Protocol.Page.PrefetchStatusUpdatedEvent) => void): void;
3081
+
3072
3082
  on(event: 'loadEventFired', listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
3073
3083
 
3074
3084
  /**
@@ -3904,6 +3914,49 @@ export namespace ProtocolProxyApi {
3904
3914
  on(event: 'playersCreated', listener: (params: Protocol.Media.PlayersCreatedEvent) => void): void;
3905
3915
 
3906
3916
  }
3917
+
3918
+ export interface DeviceAccessApi {
3919
+ /**
3920
+ * Enable events in this domain.
3921
+ */
3922
+ enable(): Promise<void>;
3923
+
3924
+ /**
3925
+ * Disable events in this domain.
3926
+ */
3927
+ disable(): Promise<void>;
3928
+
3929
+ /**
3930
+ * Select a device in response to a DeviceAccess.deviceRequestPrompted event.
3931
+ */
3932
+ selectPrompt(params: Protocol.DeviceAccess.SelectPromptRequest): Promise<void>;
3933
+
3934
+ /**
3935
+ * Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.
3936
+ */
3937
+ cancelPrompt(params: Protocol.DeviceAccess.CancelPromptRequest): Promise<void>;
3938
+
3939
+ /**
3940
+ * A device request opened a user prompt to select a device. Respond with the
3941
+ * selectPrompt or cancelPrompt command.
3942
+ */
3943
+ on(event: 'deviceRequestPrompted', listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
3944
+
3945
+ }
3946
+
3947
+ export interface PreloadApi {
3948
+ enable(): Promise<void>;
3949
+
3950
+ disable(): Promise<void>;
3951
+
3952
+ /**
3953
+ * Upsert. Currently, it is only emitted when a rule set added.
3954
+ */
3955
+ on(event: 'ruleSetUpdated', listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
3956
+
3957
+ on(event: 'ruleSetRemoved', listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
3958
+
3959
+ }
3907
3960
  }
3908
3961
 
3909
3962
  export default ProtocolProxyApi;
@@ -12906,6 +12906,11 @@ export namespace Protocol {
12906
12906
  */
12907
12907
  export type PrerenderFinalStatus = ('Activated' | 'Destroyed' | 'LowEndDevice' | 'InvalidSchemeRedirect' | 'InvalidSchemeNavigation' | 'InProgressNavigation' | 'NavigationRequestBlockedByCsp' | 'MainFrameNavigation' | 'MojoBinderPolicy' | 'RendererProcessCrashed' | 'RendererProcessKilled' | 'Download' | 'TriggerDestroyed' | 'NavigationNotCommitted' | 'NavigationBadHttpStatus' | 'ClientCertRequested' | 'NavigationRequestNetworkError' | 'MaxNumOfRunningPrerendersExceeded' | 'CancelAllHostsForTesting' | 'DidFailLoad' | 'Stop' | 'SslCertificateError' | 'LoginAuthRequested' | 'UaChangeRequiresReload' | 'BlockedByClient' | 'AudioOutputDeviceRequested' | 'MixedContent' | 'TriggerBackgrounded' | 'EmbedderTriggeredAndCrossOriginRedirected' | 'MemoryLimitExceeded' | 'FailToGetMemoryUsage' | 'DataSaverEnabled' | 'HasEffectiveUrl' | 'ActivatedBeforeStarted' | 'InactivePageRestriction' | 'StartFailed' | 'TimeoutBackgrounded' | 'CrossSiteRedirect' | 'CrossSiteNavigation' | 'SameSiteCrossOriginRedirect' | 'SameSiteCrossOriginNavigation' | 'SameSiteCrossOriginRedirectNotOptIn' | 'SameSiteCrossOriginNavigationNotOptIn' | 'ActivationNavigationParameterMismatch' | 'ActivatedInBackground' | 'EmbedderHostDisallowed' | 'ActivationNavigationDestroyedBeforeSuccess' | 'TabClosedByUserGesture' | 'TabClosedWithoutUserGesture' | 'PrimaryMainFrameRendererProcessCrashed' | 'PrimaryMainFrameRendererProcessKilled' | 'ActivationFramePolicyNotCompatible' | 'PreloadingDisabled' | 'BatterySaverEnabled' | 'ActivatedDuringMainFrameNavigation' | 'PreloadingUnsupportedByWebContents');
12908
12908
 
12909
+ /**
12910
+ * List of Prefetch status, which refers to PreloadingTriggeringOutcome.
12911
+ */
12912
+ export type PrefetchStatus = ('Running' | 'Ready' | 'Success' | 'Failure' | 'NotSupported');
12913
+
12909
12914
  export interface AddScriptToEvaluateOnLoadRequest {
12910
12915
  scriptSource: string;
12911
12916
  }
@@ -13941,6 +13946,19 @@ export namespace Protocol {
13941
13946
  disallowedApiMethod?: string;
13942
13947
  }
13943
13948
 
13949
+ /**
13950
+ * TODO(crbug/1384419): Create a dedicated domain for preloading.
13951
+ * Fired when a prefetch attempt is updated.
13952
+ */
13953
+ export interface PrefetchStatusUpdatedEvent {
13954
+ /**
13955
+ * The frame id of the frame initiating prefetch.
13956
+ */
13957
+ initiatingFrameId: FrameId;
13958
+ prefetchUrl: string;
13959
+ status: PrefetchStatus;
13960
+ }
13961
+
13944
13962
  export interface LoadEventFiredEvent {
13945
13963
  timestamp: Network.MonotonicTime;
13946
13964
  }
@@ -16835,6 +16853,88 @@ export namespace Protocol {
16835
16853
  players: PlayerId[];
16836
16854
  }
16837
16855
  }
16856
+
16857
+ export namespace DeviceAccess {
16858
+
16859
+ /**
16860
+ * Device request id.
16861
+ */
16862
+ export type RequestId = string;
16863
+
16864
+ /**
16865
+ * A device id.
16866
+ */
16867
+ export type DeviceId = string;
16868
+
16869
+ /**
16870
+ * Device information displayed in a user prompt to select a device.
16871
+ */
16872
+ export interface PromptDevice {
16873
+ id: DeviceId;
16874
+ /**
16875
+ * Display name as it appears in a device request user prompt.
16876
+ */
16877
+ name: string;
16878
+ }
16879
+
16880
+ export interface SelectPromptRequest {
16881
+ id: RequestId;
16882
+ deviceId: DeviceId;
16883
+ }
16884
+
16885
+ export interface CancelPromptRequest {
16886
+ id: RequestId;
16887
+ }
16888
+
16889
+ /**
16890
+ * A device request opened a user prompt to select a device. Respond with the
16891
+ * selectPrompt or cancelPrompt command.
16892
+ */
16893
+ export interface DeviceRequestPromptedEvent {
16894
+ id: RequestId;
16895
+ devices: PromptDevice[];
16896
+ }
16897
+ }
16898
+
16899
+ export namespace Preload {
16900
+
16901
+ /**
16902
+ * Unique id
16903
+ */
16904
+ export type RuleSetId = string;
16905
+
16906
+ /**
16907
+ * Corresponds to SpeculationRuleSet
16908
+ */
16909
+ export interface RuleSet {
16910
+ id: RuleSetId;
16911
+ /**
16912
+ * Identifies a document which the rule set is associated with.
16913
+ */
16914
+ loaderId: Network.LoaderId;
16915
+ /**
16916
+ * Source text of JSON representing the rule set. If it comes from
16917
+ * <script> tag, it is the textContent of the node. Note that it is
16918
+ * a JSON for valid case.
16919
+ *
16920
+ * See also:
16921
+ * - https://wicg.github.io/nav-speculation/speculation-rules.html
16922
+ * - https://github.com/WICG/nav-speculation/blob/main/triggers.md
16923
+ */
16924
+ sourceText: string;
16925
+ }
16926
+
16927
+ /**
16928
+ * Upsert. Currently, it is only emitted when a rule set added.
16929
+ */
16930
+ export interface RuleSetUpdatedEvent {
16931
+ ruleSet: RuleSet;
16932
+ }
16933
+
16934
+ export interface RuleSetRemovedEvent {
16935
+ id: RuleSetId;
16936
+ }
16937
+ }
16838
16938
  }
16839
16939
 
16840
16940
  export default Protocol;