Documentation ¶
Overview ¶
Package preload provides the Chrome DevTools Protocol commands, types, and events for the Preload domain.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type DisableParams
- type EnableParams
- type EventPrefetchStatusUpdated
- type EventPreloadEnabledStateUpdated
- type EventPreloadingAttemptSourcesUpdated
- func (v EventPreloadingAttemptSourcesUpdated) MarshalEasyJSON(w *jwriter.Writer)
- func (v EventPreloadingAttemptSourcesUpdated) MarshalJSON() ([]byte, error)
- func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalJSON(data []byte) error
- type EventPrerenderStatusUpdated
- type EventRuleSetRemoved
- type EventRuleSetUpdated
- type IngAttemptKey
- type IngAttemptSource
- type IngStatus
- type PipelineID
- type PrefetchStatus
- type PrerenderFinalStatus
- func (t PrerenderFinalStatus) MarshalEasyJSON(out *jwriter.Writer)
- func (t PrerenderFinalStatus) MarshalJSON() ([]byte, error)
- func (t PrerenderFinalStatus) String() string
- func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (t *PrerenderFinalStatus) UnmarshalJSON(buf []byte) error
- type PrerenderMismatchedHeaders
- type RuleSet
- type RuleSetErrorType
- type RuleSetID
- type SpeculationAction
- type SpeculationTargetHint
- func (t SpeculationTargetHint) MarshalEasyJSON(out *jwriter.Writer)
- func (t SpeculationTargetHint) MarshalJSON() ([]byte, error)
- func (t SpeculationTargetHint) String() string
- func (t *SpeculationTargetHint) UnmarshalEasyJSON(in *jlexer.Lexer)
- func (t *SpeculationTargetHint) UnmarshalJSON(buf []byte) error
Constants ¶
const ( CommandEnable = "Preload.enable" CommandDisable = "Preload.disable" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisableParams ¶
type DisableParams struct{}
DisableParams [no description].
func Disable ¶
func Disable() *DisableParams
Disable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#method-disable
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctx context.Context) (err error)
Do executes Preload.disable against the provided context.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams ¶
type EnableParams struct{}
EnableParams [no description].
func Enable ¶
func Enable() *EnableParams
Enable [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#method-enable
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Preload.enable against the provided context.
func (EnableParams) MarshalEasyJSON ¶
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EnableParams) MarshalJSON ¶
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EnableParams) UnmarshalEasyJSON ¶
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EnableParams) UnmarshalJSON ¶
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventPrefetchStatusUpdated ¶
type EventPrefetchStatusUpdated struct { Key *IngAttemptKey `json:"key"` PipelineID PipelineID `json:"pipelineId"` InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch. PrefetchURL string `json:"prefetchUrl"` Status IngStatus `json:"status"` PrefetchStatus PrefetchStatus `json:"prefetchStatus"` RequestID network.RequestID `json:"requestId"` }
EventPrefetchStatusUpdated fired when a prefetch attempt is updated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prefetchStatusUpdated
func (EventPrefetchStatusUpdated) MarshalEasyJSON ¶
func (v EventPrefetchStatusUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventPrefetchStatusUpdated) MarshalJSON ¶
func (v EventPrefetchStatusUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventPrefetchStatusUpdated) UnmarshalEasyJSON ¶
func (v *EventPrefetchStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventPrefetchStatusUpdated) UnmarshalJSON ¶
func (v *EventPrefetchStatusUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventPreloadEnabledStateUpdated ¶
type EventPreloadEnabledStateUpdated struct { DisabledByPreference bool `json:"disabledByPreference"` DisabledByDataSaver bool `json:"disabledByDataSaver"` DisabledByBatterySaver bool `json:"disabledByBatterySaver"` DisabledByHoldbackPrefetchSpeculationRules bool `json:"disabledByHoldbackPrefetchSpeculationRules"` DisabledByHoldbackPrerenderSpeculationRules bool `json:"disabledByHoldbackPrerenderSpeculationRules"` }
EventPreloadEnabledStateUpdated fired when a preload enabled state is updated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadEnabledStateUpdated
func (EventPreloadEnabledStateUpdated) MarshalEasyJSON ¶
func (v EventPreloadEnabledStateUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventPreloadEnabledStateUpdated) MarshalJSON ¶
func (v EventPreloadEnabledStateUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventPreloadEnabledStateUpdated) UnmarshalEasyJSON ¶
func (v *EventPreloadEnabledStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventPreloadEnabledStateUpdated) UnmarshalJSON ¶
func (v *EventPreloadEnabledStateUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventPreloadingAttemptSourcesUpdated ¶
type EventPreloadingAttemptSourcesUpdated struct { LoaderID cdp.LoaderID `json:"loaderId"` PreloadingAttemptSources []*IngAttemptSource `json:"preloadingAttemptSources"` }
EventPreloadingAttemptSourcesUpdated send a list of sources for all preloading attempts in a document.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-preloadingAttemptSourcesUpdated
func (EventPreloadingAttemptSourcesUpdated) MarshalEasyJSON ¶
func (v EventPreloadingAttemptSourcesUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventPreloadingAttemptSourcesUpdated) MarshalJSON ¶
func (v EventPreloadingAttemptSourcesUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventPreloadingAttemptSourcesUpdated) UnmarshalEasyJSON ¶
func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventPreloadingAttemptSourcesUpdated) UnmarshalJSON ¶
func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventPrerenderStatusUpdated ¶
type EventPrerenderStatusUpdated struct { Key *IngAttemptKey `json:"key"` PipelineID PipelineID `json:"pipelineId"` Status IngStatus `json:"status"` PrerenderStatus PrerenderFinalStatus `json:"prerenderStatus,omitempty"` DisallowedMojoInterface string `json:"disallowedMojoInterface,omitempty"` // This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt. MismatchedHeaders []*PrerenderMismatchedHeaders `json:"mismatchedHeaders,omitempty"` }
EventPrerenderStatusUpdated fired when a prerender attempt is updated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-prerenderStatusUpdated
func (EventPrerenderStatusUpdated) MarshalEasyJSON ¶
func (v EventPrerenderStatusUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventPrerenderStatusUpdated) MarshalJSON ¶
func (v EventPrerenderStatusUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventPrerenderStatusUpdated) UnmarshalEasyJSON ¶
func (v *EventPrerenderStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventPrerenderStatusUpdated) UnmarshalJSON ¶
func (v *EventPrerenderStatusUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventRuleSetRemoved ¶
type EventRuleSetRemoved struct {
ID RuleSetID `json:"id"`
}
EventRuleSetRemoved [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetRemoved
func (EventRuleSetRemoved) MarshalEasyJSON ¶
func (v EventRuleSetRemoved) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventRuleSetRemoved) MarshalJSON ¶
func (v EventRuleSetRemoved) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventRuleSetRemoved) UnmarshalEasyJSON ¶
func (v *EventRuleSetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventRuleSetRemoved) UnmarshalJSON ¶
func (v *EventRuleSetRemoved) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventRuleSetUpdated ¶
type EventRuleSetUpdated struct {
RuleSet *RuleSet `json:"ruleSet"`
}
EventRuleSetUpdated upsert. Currently, it is only emitted when a rule set added.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#event-ruleSetUpdated
func (EventRuleSetUpdated) MarshalEasyJSON ¶
func (v EventRuleSetUpdated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventRuleSetUpdated) MarshalJSON ¶
func (v EventRuleSetUpdated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventRuleSetUpdated) UnmarshalEasyJSON ¶
func (v *EventRuleSetUpdated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventRuleSetUpdated) UnmarshalJSON ¶
func (v *EventRuleSetUpdated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type IngAttemptKey ¶
type IngAttemptKey struct { LoaderID cdp.LoaderID `json:"loaderId"` Action SpeculationAction `json:"action"` URL string `json:"url"` TargetHint SpeculationTargetHint `json:"targetHint,omitempty"` }
IngAttemptKey a key that identifies a preloading attempt. The url used is the url specified by the trigger (i.e. the initial URL), and not the final url that is navigated to. For example, prerendering allows same-origin main frame navigations during the attempt, but the attempt is still keyed with the initial URL.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingAttemptKey
func (IngAttemptKey) MarshalEasyJSON ¶
func (v IngAttemptKey) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (IngAttemptKey) MarshalJSON ¶
func (v IngAttemptKey) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*IngAttemptKey) UnmarshalEasyJSON ¶
func (v *IngAttemptKey) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*IngAttemptKey) UnmarshalJSON ¶
func (v *IngAttemptKey) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type IngAttemptSource ¶
type IngAttemptSource struct { Key *IngAttemptKey `json:"key"` RuleSetIDs []RuleSetID `json:"ruleSetIds"` NodeIDs []cdp.BackendNodeID `json:"nodeIds"` }
IngAttemptSource lists sources for a preloading attempt, specifically the ids of rule sets that had a speculation rule that triggered the attempt, and the BackendNodeIds of <a href> or <area href> elements that triggered the attempt (in the case of attempts triggered by a document rule). It is possible for multiple rule sets and links to trigger a single attempt.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingAttemptSource
func (IngAttemptSource) MarshalEasyJSON ¶
func (v IngAttemptSource) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (IngAttemptSource) MarshalJSON ¶
func (v IngAttemptSource) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*IngAttemptSource) UnmarshalEasyJSON ¶
func (v *IngAttemptSource) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*IngAttemptSource) UnmarshalJSON ¶
func (v *IngAttemptSource) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type IngStatus ¶
type IngStatus string
IngStatus preloading status values, see also PreloadingTriggeringOutcome. This status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadingStatus
const ( IngStatusPending IngStatus = "Pending" IngStatusRunning IngStatus = "Running" IngStatusReady IngStatus = "Ready" IngStatusSuccess IngStatus = "Success" IngStatusFailure IngStatus = "Failure" IngStatusNotSupported IngStatus = "NotSupported" )
IngStatus values.
func (IngStatus) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (IngStatus) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*IngStatus) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*IngStatus) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type PipelineID ¶
type PipelineID string
PipelineID chrome manages different types of preloads together using a concept of preloading pipeline. For example, if a site uses a SpeculationRules for prerender, Chrome first starts a prefetch and then upgrades it to prerender. CDP events for them are emitted separately but they share PreloadPipelineId.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PreloadPipelineId
func (PipelineID) String ¶
func (t PipelineID) String() string
String returns the PipelineID as string value.
type PrefetchStatus ¶
type PrefetchStatus string
PrefetchStatus tODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and filter out the ones that aren't necessary to the developers.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PrefetchStatus
const ( PrefetchStatusPrefetchAllowed PrefetchStatus = "PrefetchAllowed" PrefetchStatusPrefetchFailedIneligibleRedirect PrefetchStatus = "PrefetchFailedIneligibleRedirect" PrefetchStatusPrefetchFailedInvalidRedirect PrefetchStatus = "PrefetchFailedInvalidRedirect" PrefetchStatusPrefetchFailedMIMENotSupported PrefetchStatus = "PrefetchFailedMIMENotSupported" PrefetchStatusPrefetchFailedNetError PrefetchStatus = "PrefetchFailedNetError" PrefetchStatusPrefetchFailedNon2xX PrefetchStatus = "PrefetchFailedNon2XX" PrefetchStatusPrefetchEvictedAfterCandidateRemoved PrefetchStatus = "PrefetchEvictedAfterCandidateRemoved" PrefetchStatusPrefetchEvictedForNewerPrefetch PrefetchStatus = "PrefetchEvictedForNewerPrefetch" PrefetchStatusPrefetchHeldback PrefetchStatus = "PrefetchHeldback" PrefetchStatusPrefetchIneligibleRetryAfter PrefetchStatus = "PrefetchIneligibleRetryAfter" PrefetchStatusPrefetchIsPrivacyDecoy PrefetchStatus = "PrefetchIsPrivacyDecoy" PrefetchStatusPrefetchIsStale PrefetchStatus = "PrefetchIsStale" PrefetchStatusPrefetchNotEligibleBrowserContextOffTheRecord PrefetchStatus = "PrefetchNotEligibleBrowserContextOffTheRecord" PrefetchStatusPrefetchNotEligibleDataSaverEnabled PrefetchStatus = "PrefetchNotEligibleDataSaverEnabled" PrefetchStatusPrefetchNotEligibleExistingProxy PrefetchStatus = "PrefetchNotEligibleExistingProxy" PrefetchStatusPrefetchNotEligibleHostIsNonUnique PrefetchStatus = "PrefetchNotEligibleHostIsNonUnique" PrefetchStatusPrefetchNotEligibleNonDefaultStoragePartition PrefetchStatus = "PrefetchNotEligibleNonDefaultStoragePartition" PrefetchStatusPrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy PrefetchStatus = "PrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxy" PrefetchStatusPrefetchNotEligibleSchemeIsNotHTTPS PrefetchStatus = "PrefetchNotEligibleSchemeIsNotHttps" PrefetchStatusPrefetchNotEligibleUserHasCookies PrefetchStatus = "PrefetchNotEligibleUserHasCookies" PrefetchStatusPrefetchNotEligibleUserHasServiceWorker PrefetchStatus = "PrefetchNotEligibleUserHasServiceWorker" PrefetchStatusPrefetchNotEligibleBatterySaverEnabled PrefetchStatus = "PrefetchNotEligibleBatterySaverEnabled" PrefetchStatusPrefetchNotEligiblePreloadingDisabled PrefetchStatus = "PrefetchNotEligiblePreloadingDisabled" PrefetchStatusPrefetchNotFinishedInTime PrefetchStatus = "PrefetchNotFinishedInTime" PrefetchStatusPrefetchNotStarted PrefetchStatus = "PrefetchNotStarted" PrefetchStatusPrefetchNotUsedCookiesChanged PrefetchStatus = "PrefetchNotUsedCookiesChanged" PrefetchStatusPrefetchProxyNotAvailable PrefetchStatus = "PrefetchProxyNotAvailable" PrefetchStatusPrefetchResponseUsed PrefetchStatus = "PrefetchResponseUsed" PrefetchStatusPrefetchSuccessfulButNotUsed PrefetchStatus = "PrefetchSuccessfulButNotUsed" PrefetchStatusPrefetchNotUsedProbeFailed PrefetchStatus = "PrefetchNotUsedProbeFailed" )
PrefetchStatus values.
func (PrefetchStatus) MarshalEasyJSON ¶
func (t PrefetchStatus) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (PrefetchStatus) MarshalJSON ¶
func (t PrefetchStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (PrefetchStatus) String ¶
func (t PrefetchStatus) String() string
String returns the PrefetchStatus as string value.
func (*PrefetchStatus) UnmarshalEasyJSON ¶
func (t *PrefetchStatus) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*PrefetchStatus) UnmarshalJSON ¶
func (t *PrefetchStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type PrerenderFinalStatus ¶
type PrerenderFinalStatus string
PrerenderFinalStatus list of FinalStatus reasons for Prerender2.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PrerenderFinalStatus
const ( PrerenderFinalStatusActivated PrerenderFinalStatus = "Activated" PrerenderFinalStatusDestroyed PrerenderFinalStatus = "Destroyed" PrerenderFinalStatusLowEndDevice PrerenderFinalStatus = "LowEndDevice" PrerenderFinalStatusInvalidSchemeRedirect PrerenderFinalStatus = "InvalidSchemeRedirect" PrerenderFinalStatusMojoBinderPolicy PrerenderFinalStatus = "MojoBinderPolicy" PrerenderFinalStatusRendererProcessCrashed PrerenderFinalStatus = "RendererProcessCrashed" PrerenderFinalStatusRendererProcessKilled PrerenderFinalStatus = "RendererProcessKilled" PrerenderFinalStatusDownload PrerenderFinalStatus = "Download" PrerenderFinalStatusTriggerDestroyed PrerenderFinalStatus = "TriggerDestroyed" PrerenderFinalStatusClientCertRequested PrerenderFinalStatus = "ClientCertRequested" PrerenderFinalStatusCancelAllHostsForTesting PrerenderFinalStatus = "CancelAllHostsForTesting" PrerenderFinalStatusDidFailLoad PrerenderFinalStatus = "DidFailLoad" PrerenderFinalStatusStop PrerenderFinalStatus = "Stop" PrerenderFinalStatusSslCertificateError PrerenderFinalStatus = "SslCertificateError" PrerenderFinalStatusLoginAuthRequested PrerenderFinalStatus = "LoginAuthRequested" PrerenderFinalStatusUaChangeRequiresReload PrerenderFinalStatus = "UaChangeRequiresReload" PrerenderFinalStatusBlockedByClient PrerenderFinalStatus = "BlockedByClient" PrerenderFinalStatusAudioOutputDeviceRequested PrerenderFinalStatus = "AudioOutputDeviceRequested" PrerenderFinalStatusMixedContent PrerenderFinalStatus = "MixedContent" PrerenderFinalStatusTriggerBackgrounded PrerenderFinalStatus = "TriggerBackgrounded" PrerenderFinalStatusMemoryLimitExceeded PrerenderFinalStatus = "MemoryLimitExceeded" PrerenderFinalStatusDataSaverEnabled PrerenderFinalStatus = "DataSaverEnabled" PrerenderFinalStatusTriggerURLHasEffectiveURL PrerenderFinalStatus = "TriggerUrlHasEffectiveUrl" PrerenderFinalStatusActivatedBeforeStarted PrerenderFinalStatus = "ActivatedBeforeStarted" PrerenderFinalStatusInactivePageRestriction PrerenderFinalStatus = "InactivePageRestriction" PrerenderFinalStatusStartFailed PrerenderFinalStatus = "StartFailed" PrerenderFinalStatusTimeoutBackgrounded PrerenderFinalStatus = "TimeoutBackgrounded" PrerenderFinalStatusActivatedInBackground PrerenderFinalStatus = "ActivatedInBackground" PrerenderFinalStatusEmbedderHostDisallowed PrerenderFinalStatus = "EmbedderHostDisallowed" PrerenderFinalStatusTabClosedByUserGesture PrerenderFinalStatus = "TabClosedByUserGesture" PrerenderFinalStatusTabClosedWithoutUserGesture PrerenderFinalStatus = "TabClosedWithoutUserGesture" PrerenderFinalStatusPrimaryMainFrameRendererProcessCrashed PrerenderFinalStatus = "PrimaryMainFrameRendererProcessCrashed" PrerenderFinalStatusPrimaryMainFrameRendererProcessKilled PrerenderFinalStatus = "PrimaryMainFrameRendererProcessKilled" PrerenderFinalStatusActivationFramePolicyNotCompatible PrerenderFinalStatus = "ActivationFramePolicyNotCompatible" PrerenderFinalStatusPreloadingDisabled PrerenderFinalStatus = "PreloadingDisabled" PrerenderFinalStatusBatterySaverEnabled PrerenderFinalStatus = "BatterySaverEnabled" PrerenderFinalStatusPreloadingUnsupportedByWebContents PrerenderFinalStatus = "PreloadingUnsupportedByWebContents" PrerenderFinalStatusMemoryPressureOnTrigger PrerenderFinalStatus = "MemoryPressureOnTrigger" PrerenderFinalStatusMemoryPressureAfterTriggered PrerenderFinalStatus = "MemoryPressureAfterTriggered" PrerenderFinalStatusPrerenderingDisabledByDevTools PrerenderFinalStatus = "PrerenderingDisabledByDevTools" PrerenderFinalStatusSpeculationRuleRemoved PrerenderFinalStatus = "SpeculationRuleRemoved" PrerenderFinalStatusActivatedWithAuxiliaryBrowsingContexts PrerenderFinalStatus = "ActivatedWithAuxiliaryBrowsingContexts" PrerenderFinalStatusMaxNumOfRunningEagerPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningEagerPrerendersExceeded" PrerenderFinalStatusMaxNumOfRunningNonEagerPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningNonEagerPrerendersExceeded" PrerenderFinalStatusMaxNumOfRunningEmbedderPrerendersExceeded PrerenderFinalStatus = "MaxNumOfRunningEmbedderPrerendersExceeded" PrerenderFinalStatusPrerenderingURLHasEffectiveURL PrerenderFinalStatus = "PrerenderingUrlHasEffectiveUrl" PrerenderFinalStatusRedirectedPrerenderingURLHasEffectiveURL PrerenderFinalStatus = "RedirectedPrerenderingUrlHasEffectiveUrl" PrerenderFinalStatusActivationURLHasEffectiveURL PrerenderFinalStatus = "ActivationUrlHasEffectiveUrl" PrerenderFinalStatusJavaScriptInterfaceAdded PrerenderFinalStatus = "JavaScriptInterfaceAdded" PrerenderFinalStatusJavaScriptInterfaceRemoved PrerenderFinalStatus = "JavaScriptInterfaceRemoved" PrerenderFinalStatusAllPrerenderingCanceled PrerenderFinalStatus = "AllPrerenderingCanceled" PrerenderFinalStatusWindowClosed PrerenderFinalStatus = "WindowClosed" PrerenderFinalStatusSlowNetwork PrerenderFinalStatus = "SlowNetwork" PrerenderFinalStatusOtherPrerenderedPageActivated PrerenderFinalStatus = "OtherPrerenderedPageActivated" PrerenderFinalStatusV8optimizerDisabled PrerenderFinalStatus = "V8OptimizerDisabled" PrerenderFinalStatusPrerenderFailedDuringPrefetch PrerenderFinalStatus = "PrerenderFailedDuringPrefetch" )
PrerenderFinalStatus values.
func (PrerenderFinalStatus) MarshalEasyJSON ¶
func (t PrerenderFinalStatus) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (PrerenderFinalStatus) MarshalJSON ¶
func (t PrerenderFinalStatus) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (PrerenderFinalStatus) String ¶
func (t PrerenderFinalStatus) String() string
String returns the PrerenderFinalStatus as string value.
func (*PrerenderFinalStatus) UnmarshalEasyJSON ¶
func (t *PrerenderFinalStatus) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*PrerenderFinalStatus) UnmarshalJSON ¶
func (t *PrerenderFinalStatus) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type PrerenderMismatchedHeaders ¶
type PrerenderMismatchedHeaders struct { HeaderName string `json:"headerName"` InitialValue string `json:"initialValue,omitempty"` ActivationValue string `json:"activationValue,omitempty"` }
PrerenderMismatchedHeaders information of headers to be displayed when the header mismatch occurred.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-PrerenderMismatchedHeaders
func (PrerenderMismatchedHeaders) MarshalEasyJSON ¶
func (v PrerenderMismatchedHeaders) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PrerenderMismatchedHeaders) MarshalJSON ¶
func (v PrerenderMismatchedHeaders) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PrerenderMismatchedHeaders) UnmarshalEasyJSON ¶
func (v *PrerenderMismatchedHeaders) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PrerenderMismatchedHeaders) UnmarshalJSON ¶
func (v *PrerenderMismatchedHeaders) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RuleSet ¶
type RuleSet struct { ID RuleSetID `json:"id"` LoaderID cdp.LoaderID `json:"loaderId"` // Identifies a document which the rule set is associated with. SourceText string `json:"sourceText"` // Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // A speculation rule set is either added through an inline <script> tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant <script> tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header URL string `json:"url,omitempty"` RequestID network.RequestID `json:"requestId,omitempty"` ErrorType RuleSetErrorType `json:"errorType,omitempty"` // Error information errorMessage is null iff errorType is null. }
RuleSet corresponds to SpeculationRuleSet.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSet
func (RuleSet) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (RuleSet) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*RuleSet) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RuleSet) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type RuleSetErrorType ¶
type RuleSetErrorType string
RuleSetErrorType [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSetErrorType
const ( RuleSetErrorTypeSourceIsNotJSONObject RuleSetErrorType = "SourceIsNotJsonObject" RuleSetErrorTypeInvalidRulesSkipped RuleSetErrorType = "InvalidRulesSkipped" )
RuleSetErrorType values.
func (RuleSetErrorType) MarshalEasyJSON ¶
func (t RuleSetErrorType) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (RuleSetErrorType) MarshalJSON ¶
func (t RuleSetErrorType) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (RuleSetErrorType) String ¶
func (t RuleSetErrorType) String() string
String returns the RuleSetErrorType as string value.
func (*RuleSetErrorType) UnmarshalEasyJSON ¶
func (t *RuleSetErrorType) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*RuleSetErrorType) UnmarshalJSON ¶
func (t *RuleSetErrorType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type RuleSetID ¶
type RuleSetID string
RuleSetID unique id.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-RuleSetId
type SpeculationAction ¶
type SpeculationAction string
SpeculationAction the type of preloading attempted. It corresponds to mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it isn't being used by clients).
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-SpeculationAction
const ( SpeculationActionPrefetch SpeculationAction = "Prefetch" SpeculationActionPrerender SpeculationAction = "Prerender" )
SpeculationAction values.
func (SpeculationAction) MarshalEasyJSON ¶
func (t SpeculationAction) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (SpeculationAction) MarshalJSON ¶
func (t SpeculationAction) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (SpeculationAction) String ¶
func (t SpeculationAction) String() string
String returns the SpeculationAction as string value.
func (*SpeculationAction) UnmarshalEasyJSON ¶
func (t *SpeculationAction) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*SpeculationAction) UnmarshalJSON ¶
func (t *SpeculationAction) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.
type SpeculationTargetHint ¶
type SpeculationTargetHint string
SpeculationTargetHint corresponds to mojom::SpeculationTargetHint. See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints.
See: https://chromedevtools.github.io/devtools-protocol/tot/Preload#type-SpeculationTargetHint
const ( SpeculationTargetHintBlank SpeculationTargetHint = "Blank" SpeculationTargetHintSelf SpeculationTargetHint = "Self" )
SpeculationTargetHint values.
func (SpeculationTargetHint) MarshalEasyJSON ¶
func (t SpeculationTargetHint) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (SpeculationTargetHint) MarshalJSON ¶
func (t SpeculationTargetHint) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (SpeculationTargetHint) String ¶
func (t SpeculationTargetHint) String() string
String returns the SpeculationTargetHint as string value.
func (*SpeculationTargetHint) UnmarshalEasyJSON ¶
func (t *SpeculationTargetHint) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*SpeculationTargetHint) UnmarshalJSON ¶
func (t *SpeculationTargetHint) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.