devtools-protocol 0.0.1103684 → 0.0.1107588
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.
@@ -16438,10 +16438,11 @@
|
|
16438
16438
|
]
|
16439
16439
|
},
|
16440
16440
|
{
|
16441
|
-
"id": "
|
16442
|
-
"description": "
|
16441
|
+
"id": "PreloadingStatus",
|
16442
|
+
"description": "Preloading status values, see also PreloadingTriggeringOutcome. This\nstatus is shared by prefetchStatusUpdated and prerenderStatusUpdated.",
|
16443
16443
|
"type": "string",
|
16444
16444
|
"enum": [
|
16445
|
+
"Pending",
|
16445
16446
|
"Running",
|
16446
16447
|
"Ready",
|
16447
16448
|
"Success",
|
@@ -18064,7 +18065,27 @@
|
|
18064
18065
|
},
|
18065
18066
|
{
|
18066
18067
|
"name": "status",
|
18067
|
-
"$ref": "
|
18068
|
+
"$ref": "PreloadingStatus"
|
18069
|
+
}
|
18070
|
+
]
|
18071
|
+
},
|
18072
|
+
{
|
18073
|
+
"name": "prerenderStatusUpdated",
|
18074
|
+
"description": "TODO(crbug/1384419): Create a dedicated domain for preloading.\nFired when a prerender attempt is updated.",
|
18075
|
+
"experimental": true,
|
18076
|
+
"parameters": [
|
18077
|
+
{
|
18078
|
+
"name": "initiatingFrameId",
|
18079
|
+
"description": "The frame id of the frame initiating prerender.",
|
18080
|
+
"$ref": "FrameId"
|
18081
|
+
},
|
18082
|
+
{
|
18083
|
+
"name": "prerenderingUrl",
|
18084
|
+
"type": "string"
|
18085
|
+
},
|
18086
|
+
{
|
18087
|
+
"name": "status",
|
18088
|
+
"$ref": "PreloadingStatus"
|
18068
18089
|
}
|
18069
18090
|
]
|
18070
18091
|
},
|
@@ -22880,6 +22901,67 @@
|
|
22880
22901
|
]
|
22881
22902
|
}
|
22882
22903
|
]
|
22904
|
+
},
|
22905
|
+
{
|
22906
|
+
"domain": "Preload",
|
22907
|
+
"experimental": true,
|
22908
|
+
"types": [
|
22909
|
+
{
|
22910
|
+
"id": "RuleSetId",
|
22911
|
+
"description": "Unique id",
|
22912
|
+
"type": "string"
|
22913
|
+
},
|
22914
|
+
{
|
22915
|
+
"id": "RuleSet",
|
22916
|
+
"description": "Corresponds to SpeculationRuleSet",
|
22917
|
+
"type": "object",
|
22918
|
+
"properties": [
|
22919
|
+
{
|
22920
|
+
"name": "id",
|
22921
|
+
"$ref": "RuleSetId"
|
22922
|
+
},
|
22923
|
+
{
|
22924
|
+
"name": "loaderId",
|
22925
|
+
"description": "Identifies a document which the rule set is associated with.",
|
22926
|
+
"$ref": "Network.LoaderId"
|
22927
|
+
},
|
22928
|
+
{
|
22929
|
+
"name": "sourceText",
|
22930
|
+
"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",
|
22931
|
+
"type": "string"
|
22932
|
+
}
|
22933
|
+
]
|
22934
|
+
}
|
22935
|
+
],
|
22936
|
+
"commands": [
|
22937
|
+
{
|
22938
|
+
"name": "enable"
|
22939
|
+
},
|
22940
|
+
{
|
22941
|
+
"name": "disable"
|
22942
|
+
}
|
22943
|
+
],
|
22944
|
+
"events": [
|
22945
|
+
{
|
22946
|
+
"name": "ruleSetUpdated",
|
22947
|
+
"description": "Upsert. Currently, it is only emitted when a rule set added.",
|
22948
|
+
"parameters": [
|
22949
|
+
{
|
22950
|
+
"name": "ruleSet",
|
22951
|
+
"$ref": "RuleSet"
|
22952
|
+
}
|
22953
|
+
]
|
22954
|
+
},
|
22955
|
+
{
|
22956
|
+
"name": "ruleSetRemoved",
|
22957
|
+
"parameters": [
|
22958
|
+
{
|
22959
|
+
"name": "id",
|
22960
|
+
"$ref": "RuleSetId"
|
22961
|
+
}
|
22962
|
+
]
|
22963
|
+
}
|
22964
|
+
]
|
22883
22965
|
}
|
22884
22966
|
]
|
22885
22967
|
}
|
package/package.json
CHANGED
package/pdl/browser_protocol.pdl
CHANGED
@@ -8555,14 +8555,16 @@ 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
|
-
#
|
8559
|
-
|
8558
|
+
# Preloading status values, see also PreloadingTriggeringOutcome. This
|
8559
|
+
# status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
|
8560
|
+
type PreloadingStatus extends string
|
8560
8561
|
enum
|
8562
|
+
Pending
|
8561
8563
|
Running
|
8562
8564
|
Ready
|
8563
8565
|
Success
|
8564
8566
|
Failure
|
8565
|
-
# PreloadingTriggeringOutcome which not used by prefetch.
|
8567
|
+
# PreloadingTriggeringOutcome which not used by prefetch nor prerender.
|
8566
8568
|
NotSupported
|
8567
8569
|
|
8568
8570
|
# TODO(crbug/1384419): Create a dedicated domain for preloading.
|
@@ -8572,7 +8574,16 @@ domain Page
|
|
8572
8574
|
# The frame id of the frame initiating prefetch.
|
8573
8575
|
FrameId initiatingFrameId
|
8574
8576
|
string prefetchUrl
|
8575
|
-
|
8577
|
+
PreloadingStatus status
|
8578
|
+
|
8579
|
+
# TODO(crbug/1384419): Create a dedicated domain for preloading.
|
8580
|
+
# Fired when a prerender attempt is updated.
|
8581
|
+
experimental event prerenderStatusUpdated
|
8582
|
+
parameters
|
8583
|
+
# The frame id of the frame initiating prerender.
|
8584
|
+
FrameId initiatingFrameId
|
8585
|
+
string prerenderingUrl
|
8586
|
+
PreloadingStatus status
|
8576
8587
|
|
8577
8588
|
event loadEventFired
|
8578
8589
|
parameters
|
@@ -10814,3 +10825,35 @@ experimental domain DeviceAccess
|
|
10814
10825
|
parameters
|
10815
10826
|
RequestId id
|
10816
10827
|
array of PromptDevice devices
|
10828
|
+
|
10829
|
+
experimental domain Preload
|
10830
|
+
# Unique id
|
10831
|
+
type RuleSetId extends string
|
10832
|
+
|
10833
|
+
# Corresponds to SpeculationRuleSet
|
10834
|
+
type RuleSet extends object
|
10835
|
+
properties
|
10836
|
+
RuleSetId id
|
10837
|
+
# Identifies a document which the rule set is associated with.
|
10838
|
+
Network.LoaderId loaderId
|
10839
|
+
# Source text of JSON representing the rule set. If it comes from
|
10840
|
+
# <script> tag, it is the textContent of the node. Note that it is
|
10841
|
+
# a JSON for valid case.
|
10842
|
+
#
|
10843
|
+
# See also:
|
10844
|
+
# - https://wicg.github.io/nav-speculation/speculation-rules.html
|
10845
|
+
# - https://github.com/WICG/nav-speculation/blob/main/triggers.md
|
10846
|
+
string sourceText
|
10847
|
+
|
10848
|
+
command enable
|
10849
|
+
|
10850
|
+
command disable
|
10851
|
+
|
10852
|
+
# Upsert. Currently, it is only emitted when a rule set added.
|
10853
|
+
event ruleSetUpdated
|
10854
|
+
parameters
|
10855
|
+
RuleSet ruleSet
|
10856
|
+
|
10857
|
+
event ruleSetRemoved
|
10858
|
+
parameters
|
10859
|
+
RuleSetId id
|
@@ -491,6 +491,11 @@ export namespace ProtocolMapping {
|
|
491
491
|
* Fired when a prefetch attempt is updated.
|
492
492
|
*/
|
493
493
|
'Page.prefetchStatusUpdated': [Protocol.Page.PrefetchStatusUpdatedEvent];
|
494
|
+
/**
|
495
|
+
* TODO(crbug/1384419): Create a dedicated domain for preloading.
|
496
|
+
* Fired when a prerender attempt is updated.
|
497
|
+
*/
|
498
|
+
'Page.prerenderStatusUpdated': [Protocol.Page.PrerenderStatusUpdatedEvent];
|
494
499
|
'Page.loadEventFired': [Protocol.Page.LoadEventFiredEvent];
|
495
500
|
/**
|
496
501
|
* Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
|
@@ -714,6 +719,11 @@ export namespace ProtocolMapping {
|
|
714
719
|
* selectPrompt or cancelPrompt command.
|
715
720
|
*/
|
716
721
|
'DeviceAccess.deviceRequestPrompted': [Protocol.DeviceAccess.DeviceRequestPromptedEvent];
|
722
|
+
/**
|
723
|
+
* Upsert. Currently, it is only emitted when a rule set added.
|
724
|
+
*/
|
725
|
+
'Preload.ruleSetUpdated': [Protocol.Preload.RuleSetUpdatedEvent];
|
726
|
+
'Preload.ruleSetRemoved': [Protocol.Preload.RuleSetRemovedEvent];
|
717
727
|
}
|
718
728
|
|
719
729
|
export interface Commands {
|
@@ -4629,6 +4639,14 @@ export namespace ProtocolMapping {
|
|
4629
4639
|
paramsType: [Protocol.DeviceAccess.CancelPromptRequest];
|
4630
4640
|
returnType: void;
|
4631
4641
|
};
|
4642
|
+
'Preload.enable': {
|
4643
|
+
paramsType: [];
|
4644
|
+
returnType: void;
|
4645
|
+
};
|
4646
|
+
'Preload.disable': {
|
4647
|
+
paramsType: [];
|
4648
|
+
returnType: void;
|
4649
|
+
};
|
4632
4650
|
}
|
4633
4651
|
}
|
4634
4652
|
|
@@ -104,6 +104,8 @@ export namespace ProtocolProxyApi {
|
|
104
104
|
|
105
105
|
DeviceAccess: DeviceAccessApi;
|
106
106
|
|
107
|
+
Preload: PreloadApi;
|
108
|
+
|
107
109
|
}
|
108
110
|
|
109
111
|
|
@@ -3077,6 +3079,12 @@ export namespace ProtocolProxyApi {
|
|
3077
3079
|
*/
|
3078
3080
|
on(event: 'prefetchStatusUpdated', listener: (params: Protocol.Page.PrefetchStatusUpdatedEvent) => void): void;
|
3079
3081
|
|
3082
|
+
/**
|
3083
|
+
* TODO(crbug/1384419): Create a dedicated domain for preloading.
|
3084
|
+
* Fired when a prerender attempt is updated.
|
3085
|
+
*/
|
3086
|
+
on(event: 'prerenderStatusUpdated', listener: (params: Protocol.Page.PrerenderStatusUpdatedEvent) => void): void;
|
3087
|
+
|
3080
3088
|
on(event: 'loadEventFired', listener: (params: Protocol.Page.LoadEventFiredEvent) => void): void;
|
3081
3089
|
|
3082
3090
|
/**
|
@@ -3941,6 +3949,20 @@ export namespace ProtocolProxyApi {
|
|
3941
3949
|
on(event: 'deviceRequestPrompted', listener: (params: Protocol.DeviceAccess.DeviceRequestPromptedEvent) => void): void;
|
3942
3950
|
|
3943
3951
|
}
|
3952
|
+
|
3953
|
+
export interface PreloadApi {
|
3954
|
+
enable(): Promise<void>;
|
3955
|
+
|
3956
|
+
disable(): Promise<void>;
|
3957
|
+
|
3958
|
+
/**
|
3959
|
+
* Upsert. Currently, it is only emitted when a rule set added.
|
3960
|
+
*/
|
3961
|
+
on(event: 'ruleSetUpdated', listener: (params: Protocol.Preload.RuleSetUpdatedEvent) => void): void;
|
3962
|
+
|
3963
|
+
on(event: 'ruleSetRemoved', listener: (params: Protocol.Preload.RuleSetRemovedEvent) => void): void;
|
3964
|
+
|
3965
|
+
}
|
3944
3966
|
}
|
3945
3967
|
|
3946
3968
|
export default ProtocolProxyApi;
|
package/types/protocol.d.ts
CHANGED
@@ -12907,9 +12907,10 @@ export namespace Protocol {
|
|
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
12909
|
/**
|
12910
|
-
*
|
12910
|
+
* Preloading status values, see also PreloadingTriggeringOutcome. This
|
12911
|
+
* status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
|
12911
12912
|
*/
|
12912
|
-
export type
|
12913
|
+
export type PreloadingStatus = ('Pending' | 'Running' | 'Ready' | 'Success' | 'Failure' | 'NotSupported');
|
12913
12914
|
|
12914
12915
|
export interface AddScriptToEvaluateOnLoadRequest {
|
12915
12916
|
scriptSource: string;
|
@@ -13956,7 +13957,20 @@ export namespace Protocol {
|
|
13956
13957
|
*/
|
13957
13958
|
initiatingFrameId: FrameId;
|
13958
13959
|
prefetchUrl: string;
|
13959
|
-
status:
|
13960
|
+
status: PreloadingStatus;
|
13961
|
+
}
|
13962
|
+
|
13963
|
+
/**
|
13964
|
+
* TODO(crbug/1384419): Create a dedicated domain for preloading.
|
13965
|
+
* Fired when a prerender attempt is updated.
|
13966
|
+
*/
|
13967
|
+
export interface PrerenderStatusUpdatedEvent {
|
13968
|
+
/**
|
13969
|
+
* The frame id of the frame initiating prerender.
|
13970
|
+
*/
|
13971
|
+
initiatingFrameId: FrameId;
|
13972
|
+
prerenderingUrl: string;
|
13973
|
+
status: PreloadingStatus;
|
13960
13974
|
}
|
13961
13975
|
|
13962
13976
|
export interface LoadEventFiredEvent {
|
@@ -16895,6 +16909,46 @@ export namespace Protocol {
|
|
16895
16909
|
devices: PromptDevice[];
|
16896
16910
|
}
|
16897
16911
|
}
|
16912
|
+
|
16913
|
+
export namespace Preload {
|
16914
|
+
|
16915
|
+
/**
|
16916
|
+
* Unique id
|
16917
|
+
*/
|
16918
|
+
export type RuleSetId = string;
|
16919
|
+
|
16920
|
+
/**
|
16921
|
+
* Corresponds to SpeculationRuleSet
|
16922
|
+
*/
|
16923
|
+
export interface RuleSet {
|
16924
|
+
id: RuleSetId;
|
16925
|
+
/**
|
16926
|
+
* Identifies a document which the rule set is associated with.
|
16927
|
+
*/
|
16928
|
+
loaderId: Network.LoaderId;
|
16929
|
+
/**
|
16930
|
+
* Source text of JSON representing the rule set. If it comes from
|
16931
|
+
* <script> tag, it is the textContent of the node. Note that it is
|
16932
|
+
* a JSON for valid case.
|
16933
|
+
*
|
16934
|
+
* See also:
|
16935
|
+
* - https://wicg.github.io/nav-speculation/speculation-rules.html
|
16936
|
+
* - https://github.com/WICG/nav-speculation/blob/main/triggers.md
|
16937
|
+
*/
|
16938
|
+
sourceText: string;
|
16939
|
+
}
|
16940
|
+
|
16941
|
+
/**
|
16942
|
+
* Upsert. Currently, it is only emitted when a rule set added.
|
16943
|
+
*/
|
16944
|
+
export interface RuleSetUpdatedEvent {
|
16945
|
+
ruleSet: RuleSet;
|
16946
|
+
}
|
16947
|
+
|
16948
|
+
export interface RuleSetRemovedEvent {
|
16949
|
+
id: RuleSetId;
|
16950
|
+
}
|
16951
|
+
}
|
16898
16952
|
}
|
16899
16953
|
|
16900
16954
|
export default Protocol;
|