Documentation
¶
Overview ¶
Package page provides the Chrome DevTools Protocol commands, types, and events for the Page domain.
Actions and events related to the inspected page belong to the page domain.
Generated by the cdproto-gen command.
Index ¶
- Constants
- type AdScriptID
- type AddCompilationCacheParams
- type AddScriptToEvaluateOnNewDocumentParams
- func (p *AddScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (identifier ScriptIdentifier, err error)
- func (p AddScriptToEvaluateOnNewDocumentParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *AddScriptToEvaluateOnNewDocumentParams
- func (p AddScriptToEvaluateOnNewDocumentParams) WithRunImmediately(runImmediately bool) *AddScriptToEvaluateOnNewDocumentParams
- func (p AddScriptToEvaluateOnNewDocumentParams) WithWorldName(worldName string) *AddScriptToEvaluateOnNewDocumentParams
- type AddScriptToEvaluateOnNewDocumentReturns
- type AppManifestError
- type AppManifestParsedProperties
- type AutoResponseMode
- type BackForwardCacheBlockingDetails
- type BackForwardCacheNotRestoredExplanation
- type BackForwardCacheNotRestoredExplanationTree
- type BackForwardCacheNotRestoredReason
- type BackForwardCacheNotRestoredReasonType
- type BringToFrontParams
- type CaptureScreenshotFormat
- type CaptureScreenshotParams
- func (p *CaptureScreenshotParams) Do(ctx context.Context) (data []byte, err error)
- func (p CaptureScreenshotParams) WithCaptureBeyondViewport(captureBeyondViewport bool) *CaptureScreenshotParams
- func (p CaptureScreenshotParams) WithClip(clip *Viewport) *CaptureScreenshotParams
- func (p CaptureScreenshotParams) WithFormat(format CaptureScreenshotFormat) *CaptureScreenshotParams
- func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams
- func (p CaptureScreenshotParams) WithOptimizeForSpeed(optimizeForSpeed bool) *CaptureScreenshotParams
- func (p CaptureScreenshotParams) WithQuality(quality int64) *CaptureScreenshotParams
- type CaptureScreenshotReturns
- type CaptureSnapshotFormat
- type CaptureSnapshotParams
- type CaptureSnapshotReturns
- type ClearCompilationCacheParams
- type ClientNavigationDisposition
- type ClientNavigationReason
- type CloseParams
- type CompilationCacheParams
- type CrashParams
- type CreateIsolatedWorldParams
- func (p *CreateIsolatedWorldParams) Do(ctx context.Context) (executionContextID runtime.ExecutionContextID, err error)
- func (p CreateIsolatedWorldParams) WithGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldParams
- func (p CreateIsolatedWorldParams) WithWorldName(worldName string) *CreateIsolatedWorldParams
- type CreateIsolatedWorldReturns
- type DialogType
- type DisableParams
- type EnableParams
- type EventBackForwardCacheNotUsed
- type EventCompilationCacheProduced
- type EventDocumentOpened
- type EventDomContentEventFired
- type EventFileChooserOpened
- type EventFrameAttached
- type EventFrameDetached
- type EventFrameNavigated
- type EventFrameRequestedNavigation
- type EventFrameResized
- type EventFrameStartedLoading
- type EventFrameStartedNavigating
- type EventFrameStoppedLoading
- type EventFrameSubtreeWillBeDetached
- type EventInterstitialHidden
- type EventInterstitialShown
- type EventJavascriptDialogClosed
- type EventJavascriptDialogOpening
- type EventLifecycleEvent
- type EventLoadEventFired
- type EventNavigatedWithinDocument
- type EventScreencastFrame
- type EventScreencastVisibilityChanged
- type EventWindowOpen
- type FileChooserOpenedMode
- type FileFilter
- type FileHandler
- type FontFamilies
- type FontSizes
- type FrameDetachedReason
- type FrameResource
- type FrameResourceTree
- type FrameStartedNavigatingNavigationType
- type FrameTree
- type GenerateTestReportParams
- type GetAdScriptIDParams
- type GetAdScriptIDReturns
- type GetAppIDParams
- type GetAppIDReturns
- type GetAppManifestParams
- type GetAppManifestReturns
- type GetFrameTreeParams
- type GetFrameTreeReturns
- type GetInstallabilityErrorsParams
- type GetInstallabilityErrorsReturns
- type GetLayoutMetricsParams
- type GetLayoutMetricsReturns
- type GetNavigationHistoryParams
- type GetNavigationHistoryReturns
- type GetOriginTrialsParams
- type GetOriginTrialsReturns
- type GetPermissionsPolicyStateParams
- type GetPermissionsPolicyStateReturns
- type GetResourceContentParams
- type GetResourceContentReturns
- type GetResourceTreeParams
- type GetResourceTreeReturns
- type HandleJavaScriptDialogParams
- type ImageResource
- type InstallabilityError
- type InstallabilityErrorArgument
- type LaunchHandler
- type LayoutViewport
- type NavigateParams
- func (p *NavigateParams) Do(ctx context.Context) (frameID cdp.FrameID, loaderID cdp.LoaderID, errorText string, err error)
- func (p NavigateParams) WithFrameID(frameID cdp.FrameID) *NavigateParams
- func (p NavigateParams) WithReferrer(referrer string) *NavigateParams
- func (p NavigateParams) WithReferrerPolicy(referrerPolicy ReferrerPolicy) *NavigateParams
- func (p NavigateParams) WithTransitionType(transitionType TransitionType) *NavigateParams
- type NavigateReturns
- type NavigateToHistoryEntryParams
- type NavigatedWithinDocumentNavigationType
- type NavigationEntry
- type NavigationType
- type PermissionsPolicyBlockLocator
- type PermissionsPolicyBlockReason
- type PermissionsPolicyFeature
- type PermissionsPolicyFeatureState
- type PrintToPDFParams
- func (p *PrintToPDFParams) Do(ctx context.Context) (data []byte, stream io.StreamHandle, err error)
- func (p PrintToPDFParams) WithDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithFooterTemplate(footerTemplate string) *PrintToPDFParams
- func (p PrintToPDFParams) WithGenerateDocumentOutline(generateDocumentOutline bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithGenerateTaggedPDF(generateTaggedPDF bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithHeaderTemplate(headerTemplate string) *PrintToPDFParams
- func (p PrintToPDFParams) WithLandscape(landscape bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithMarginBottom(marginBottom float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithMarginLeft(marginLeft float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithMarginRight(marginRight float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithMarginTop(marginTop float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithPageRanges(pageRanges string) *PrintToPDFParams
- func (p PrintToPDFParams) WithPaperHeight(paperHeight float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithPaperWidth(paperWidth float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithPrintBackground(printBackground bool) *PrintToPDFParams
- func (p PrintToPDFParams) WithScale(scale float64) *PrintToPDFParams
- func (p PrintToPDFParams) WithTransferMode(transferMode PrintToPDFTransferMode) *PrintToPDFParams
- type PrintToPDFReturns
- type PrintToPDFTransferMode
- type ProduceCompilationCacheParams
- type ProtocolHandler
- type ReferrerPolicy
- type RelatedApplication
- type ReloadParams
- type RemoveScriptToEvaluateOnNewDocumentParams
- type ResetNavigationHistoryParams
- type ScopeExtension
- type ScreencastFormat
- type ScreencastFrameAckParams
- type ScreencastFrameMetadata
- type Screenshot
- type ScriptFontFamilies
- type ScriptIdentifier
- type SearchInResourceParams
- type SearchInResourceReturns
- type SetAdBlockingEnabledParams
- type SetBypassCSPParams
- type SetDocumentContentParams
- type SetFontFamiliesParams
- type SetFontSizesParams
- type SetInterceptFileChooserDialogParams
- type SetLifecycleEventsEnabledParams
- type SetPrerenderingAllowedParams
- type SetRPHRegistrationModeParams
- type SetSPCTransactionModeParams
- type SetWebLifecycleStateParams
- type SetWebLifecycleStateState
- type ShareTarget
- type Shortcut
- type StartScreencastParams
- func (p *StartScreencastParams) Do(ctx context.Context) (err error)
- func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScreencastParams
- func (p StartScreencastParams) WithFormat(format ScreencastFormat) *StartScreencastParams
- func (p StartScreencastParams) WithMaxHeight(maxHeight int64) *StartScreencastParams
- func (p StartScreencastParams) WithMaxWidth(maxWidth int64) *StartScreencastParams
- func (p StartScreencastParams) WithQuality(quality int64) *StartScreencastParams
- type StopLoadingParams
- type StopScreencastParams
- type TransitionType
- type Viewport
- type VisualViewport
- type WaitForDebuggerParams
- type WebAppManifest
Constants ¶
const ( CommandAddScriptToEvaluateOnNewDocument = "Page.addScriptToEvaluateOnNewDocument" CommandBringToFront = "Page.bringToFront" CommandCaptureScreenshot = "Page.captureScreenshot" CommandCaptureSnapshot = "Page.captureSnapshot" CommandCreateIsolatedWorld = "Page.createIsolatedWorld" CommandDisable = "Page.disable" CommandEnable = "Page.enable" CommandGetAppManifest = "Page.getAppManifest" CommandGetInstallabilityErrors = "Page.getInstallabilityErrors" CommandGetAppID = "Page.getAppId" CommandGetAdScriptID = "Page.getAdScriptId" CommandGetFrameTree = "Page.getFrameTree" CommandGetLayoutMetrics = "Page.getLayoutMetrics" CommandGetResourceContent = "Page.getResourceContent" CommandGetResourceTree = "Page.getResourceTree" CommandHandleJavaScriptDialog = "Page.handleJavaScriptDialog" CommandPrintToPDF = "Page.printToPDF" CommandReload = "Page.reload" CommandRemoveScriptToEvaluateOnNewDocument = "Page.removeScriptToEvaluateOnNewDocument" CommandScreencastFrameAck = "Page.screencastFrameAck" CommandSearchInResource = "Page.searchInResource" CommandSetAdBlockingEnabled = "Page.setAdBlockingEnabled" CommandSetBypassCSP = "Page.setBypassCSP" CommandGetPermissionsPolicyState = "Page.getPermissionsPolicyState" CommandGetOriginTrials = "Page.getOriginTrials" CommandSetFontFamilies = "Page.setFontFamilies" CommandSetFontSizes = "Page.setFontSizes" CommandSetDocumentContent = "Page.setDocumentContent" CommandSetLifecycleEventsEnabled = "Page.setLifecycleEventsEnabled" CommandStartScreencast = "Page.startScreencast" CommandStopLoading = "Page.stopLoading" CommandCrash = "Page.crash" CommandClose = "Page.close" CommandSetWebLifecycleState = "Page.setWebLifecycleState" CommandStopScreencast = "Page.stopScreencast" CommandProduceCompilationCache = "Page.produceCompilationCache" CommandAddCompilationCache = "Page.addCompilationCache" CommandClearCompilationCache = "Page.clearCompilationCache" CommandSetSPCTransactionMode = "Page.setSPCTransactionMode" CommandSetRPHRegistrationMode = "Page.setRPHRegistrationMode" CommandGenerateTestReport = "Page.generateTestReport" CommandWaitForDebugger = "Page.waitForDebugger" CommandSetInterceptFileChooserDialog = "Page.setInterceptFileChooserDialog" CommandSetPrerenderingAllowed = "Page.setPrerenderingAllowed" )
Command names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdScriptID ¶
type AdScriptID struct { ScriptID runtime.ScriptID `json:"scriptId"` // Script Id of the bottom-most script which caused the frame to be labelled as an ad. DebuggerID runtime.UniqueDebuggerID `json:"debuggerId"` // Id of adScriptId's debugger. }
AdScriptID identifies the bottom-most script which caused the frame to be labelled as an ad.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdScriptId
type AddCompilationCacheParams ¶
type AddCompilationCacheParams struct { URL string `json:"url"` Data string `json:"data"` // Base64-encoded data }
AddCompilationCacheParams seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
func AddCompilationCache ¶
func AddCompilationCache(url string, data string) *AddCompilationCacheParams
AddCompilationCache seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addCompilationCache
parameters:
url data - Base64-encoded data
type AddScriptToEvaluateOnNewDocumentParams ¶
type AddScriptToEvaluateOnNewDocumentParams struct { Source string `json:"source"` WorldName string `json:"worldName,omitempty,omitzero"` // If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted. IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty,omitzero"` // Specifies whether command line API should be available to the script, defaults to false. RunImmediately bool `json:"runImmediately,omitempty,omitzero"` // If true, runs the script immediately on existing execution contexts or worlds. Default: false. }
AddScriptToEvaluateOnNewDocumentParams evaluates given script in every frame upon creation (before loading frame's scripts).
func AddScriptToEvaluateOnNewDocument ¶
func AddScriptToEvaluateOnNewDocument(source string) *AddScriptToEvaluateOnNewDocumentParams
AddScriptToEvaluateOnNewDocument evaluates given script in every frame upon creation (before loading frame's scripts).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addScriptToEvaluateOnNewDocument
parameters:
source
func (*AddScriptToEvaluateOnNewDocumentParams) Do ¶
func (p *AddScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (identifier ScriptIdentifier, err error)
Do executes Page.addScriptToEvaluateOnNewDocument against the provided context.
returns:
identifier - Identifier of the added script.
func (AddScriptToEvaluateOnNewDocumentParams) WithIncludeCommandLineAPI ¶
func (p AddScriptToEvaluateOnNewDocumentParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *AddScriptToEvaluateOnNewDocumentParams
WithIncludeCommandLineAPI specifies whether command line API should be available to the script, defaults to false.
func (AddScriptToEvaluateOnNewDocumentParams) WithRunImmediately ¶
func (p AddScriptToEvaluateOnNewDocumentParams) WithRunImmediately(runImmediately bool) *AddScriptToEvaluateOnNewDocumentParams
WithRunImmediately if true, runs the script immediately on existing execution contexts or worlds. Default: false.
func (AddScriptToEvaluateOnNewDocumentParams) WithWorldName ¶
func (p AddScriptToEvaluateOnNewDocumentParams) WithWorldName(worldName string) *AddScriptToEvaluateOnNewDocumentParams
WithWorldName if specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
type AddScriptToEvaluateOnNewDocumentReturns ¶
type AddScriptToEvaluateOnNewDocumentReturns struct {
Identifier ScriptIdentifier `json:"identifier,omitempty,omitzero"` // Identifier of the added script.
}
AddScriptToEvaluateOnNewDocumentReturns return values.
type AppManifestError ¶
type AppManifestError struct { Message string `json:"message"` // Error message. Critical int64 `json:"critical"` // If critical, this is a non-recoverable parse error. Line int64 `json:"line"` // Error line. Column int64 `json:"column"` // Error column. }
AppManifestError error while paring app manifest.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AppManifestError
type AppManifestParsedProperties ¶
type AppManifestParsedProperties struct {
Scope string `json:"scope"` // Computed scope value
}
AppManifestParsedProperties parsed app manifest properties.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AppManifestParsedProperties
type AutoResponseMode ¶
type AutoResponseMode string
AutoResponseMode enum of possible auto-response for permission / prompt dialogs.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AutoResponseMode
const ( AutoResponseModeNone AutoResponseMode = "none" AutoResponseModeAutoAccept AutoResponseMode = "autoAccept" AutoResponseModeAutoReject AutoResponseMode = "autoReject" AutoResponseModeAutoOptOut AutoResponseMode = "autoOptOut" )
AutoResponseMode values.
func (AutoResponseMode) String ¶
func (t AutoResponseMode) String() string
String returns the AutoResponseMode as string value.
func (*AutoResponseMode) UnmarshalJSON ¶
func (t *AutoResponseMode) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type BackForwardCacheBlockingDetails ¶
type BackForwardCacheBlockingDetails struct { URL string `json:"url,omitempty,omitzero"` // Url of the file where blockage happened. Optional because of tests. Function string `json:"function,omitempty,omitzero"` // Function name where blockage happened. Optional because of anonymous functions and tests. LineNumber int64 `json:"lineNumber"` // Line number in the script (0-based). ColumnNumber int64 `json:"columnNumber"` // Column number in the script (0-based). }
BackForwardCacheBlockingDetails [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-BackForwardCacheBlockingDetails
type BackForwardCacheNotRestoredExplanation ¶
type BackForwardCacheNotRestoredExplanation struct { Type BackForwardCacheNotRestoredReasonType `json:"type"` // Type of the reason Reason BackForwardCacheNotRestoredReason `json:"reason"` // Not restored reason Context string `json:"context,omitempty,omitzero"` // Context associated with the reason. The meaning of this context is dependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: the extension ID. Details []*BackForwardCacheBlockingDetails `json:"details,omitempty,omitzero"` }
BackForwardCacheNotRestoredExplanation [no description].
type BackForwardCacheNotRestoredExplanationTree ¶
type BackForwardCacheNotRestoredExplanationTree struct { URL string `json:"url"` // URL of each frame Explanations []*BackForwardCacheNotRestoredExplanation `json:"explanations"` // Not restored reasons of each frame Children []*BackForwardCacheNotRestoredExplanationTree `json:"children"` // Array of children frame }
BackForwardCacheNotRestoredExplanationTree [no description].
type BackForwardCacheNotRestoredReason ¶
type BackForwardCacheNotRestoredReason string
BackForwardCacheNotRestoredReason list of not restored reasons for back-forward cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-BackForwardCacheNotRestoredReason
const ( BackForwardCacheNotRestoredReasonNotPrimaryMainFrame BackForwardCacheNotRestoredReason = "NotPrimaryMainFrame" BackForwardCacheNotRestoredReasonBackForwardCacheDisabled BackForwardCacheNotRestoredReason = "BackForwardCacheDisabled" BackForwardCacheNotRestoredReasonRelatedActiveContentsExist BackForwardCacheNotRestoredReason = "RelatedActiveContentsExist" BackForwardCacheNotRestoredReasonHTTPSTatusNotOK BackForwardCacheNotRestoredReason = "HTTPStatusNotOK" BackForwardCacheNotRestoredReasonSchemeNotHTTPOrHTTPS BackForwardCacheNotRestoredReason = "SchemeNotHTTPOrHTTPS" BackForwardCacheNotRestoredReasonLoading BackForwardCacheNotRestoredReason = "Loading" BackForwardCacheNotRestoredReasonWasGrantedMediaAccess BackForwardCacheNotRestoredReason = "WasGrantedMediaAccess" BackForwardCacheNotRestoredReasonDisableForRenderFrameHostCalled BackForwardCacheNotRestoredReason = "DisableForRenderFrameHostCalled" BackForwardCacheNotRestoredReasonDomainNotAllowed BackForwardCacheNotRestoredReason = "DomainNotAllowed" BackForwardCacheNotRestoredReasonHTTPMethodNotGET BackForwardCacheNotRestoredReason = "HTTPMethodNotGET" BackForwardCacheNotRestoredReasonTimeout BackForwardCacheNotRestoredReason = "Timeout" BackForwardCacheNotRestoredReasonCacheLimit BackForwardCacheNotRestoredReason = "CacheLimit" BackForwardCacheNotRestoredReasonJavaScriptExecution BackForwardCacheNotRestoredReason = "JavaScriptExecution" BackForwardCacheNotRestoredReasonRendererProcessKilled BackForwardCacheNotRestoredReason = "RendererProcessKilled" BackForwardCacheNotRestoredReasonRendererProcessCrashed BackForwardCacheNotRestoredReason = "RendererProcessCrashed" BackForwardCacheNotRestoredReasonSchedulerTrackedFeatureUsed BackForwardCacheNotRestoredReason = "SchedulerTrackedFeatureUsed" BackForwardCacheNotRestoredReasonConflictingBrowsingInstance BackForwardCacheNotRestoredReason = "ConflictingBrowsingInstance" BackForwardCacheNotRestoredReasonCacheFlushed BackForwardCacheNotRestoredReason = "CacheFlushed" BackForwardCacheNotRestoredReasonServiceWorkerVersionActivation BackForwardCacheNotRestoredReason = "ServiceWorkerVersionActivation" BackForwardCacheNotRestoredReasonSessionRestored BackForwardCacheNotRestoredReason = "SessionRestored" BackForwardCacheNotRestoredReasonServiceWorkerPostMessage BackForwardCacheNotRestoredReason = "ServiceWorkerPostMessage" BackForwardCacheNotRestoredReasonEnteredBackForwardCacheBeforeServiceWorkerHostAdded BackForwardCacheNotRestoredReason = "EnteredBackForwardCacheBeforeServiceWorkerHostAdded" BackForwardCacheNotRestoredReasonRenderFrameHostReusedSameSite BackForwardCacheNotRestoredReason = "RenderFrameHostReused_SameSite" BackForwardCacheNotRestoredReasonRenderFrameHostReusedCrossSite BackForwardCacheNotRestoredReason = "RenderFrameHostReused_CrossSite" BackForwardCacheNotRestoredReasonServiceWorkerClaim BackForwardCacheNotRestoredReason = "ServiceWorkerClaim" BackForwardCacheNotRestoredReasonIgnoreEventAndEvict BackForwardCacheNotRestoredReason = "IgnoreEventAndEvict" BackForwardCacheNotRestoredReasonHaveInnerContents BackForwardCacheNotRestoredReason = "HaveInnerContents" BackForwardCacheNotRestoredReasonTimeoutPuttingInCache BackForwardCacheNotRestoredReason = "TimeoutPuttingInCache" BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByLowMemory BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByLowMemory" BackForwardCacheNotRestoredReasonBackForwardCacheDisabledByCommandLine BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledByCommandLine" BackForwardCacheNotRestoredReasonNetworkRequestDatapipeDrainedAsBytesConsumer BackForwardCacheNotRestoredReason = "NetworkRequestDatapipeDrainedAsBytesConsumer" BackForwardCacheNotRestoredReasonNetworkRequestRedirected BackForwardCacheNotRestoredReason = "NetworkRequestRedirected" BackForwardCacheNotRestoredReasonNetworkRequestTimeout BackForwardCacheNotRestoredReason = "NetworkRequestTimeout" BackForwardCacheNotRestoredReasonNetworkExceedsBufferLimit BackForwardCacheNotRestoredReason = "NetworkExceedsBufferLimit" BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForPrerender BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForPrerender" BackForwardCacheNotRestoredReasonUserAgentOverrideDiffers BackForwardCacheNotRestoredReason = "UserAgentOverrideDiffers" BackForwardCacheNotRestoredReasonForegroundCacheLimit BackForwardCacheNotRestoredReason = "ForegroundCacheLimit" BackForwardCacheNotRestoredReasonBrowsingInstanceNotSwapped BackForwardCacheNotRestoredReason = "BrowsingInstanceNotSwapped" BackForwardCacheNotRestoredReasonBackForwardCacheDisabledForDelegate BackForwardCacheNotRestoredReason = "BackForwardCacheDisabledForDelegate" BackForwardCacheNotRestoredReasonUnloadHandlerExistsInMainFrame BackForwardCacheNotRestoredReason = "UnloadHandlerExistsInMainFrame" BackForwardCacheNotRestoredReasonUnloadHandlerExistsInSubFrame BackForwardCacheNotRestoredReason = "UnloadHandlerExistsInSubFrame" BackForwardCacheNotRestoredReasonServiceWorkerUnregistration BackForwardCacheNotRestoredReason = "ServiceWorkerUnregistration" BackForwardCacheNotRestoredReasonCacheControlNoStore BackForwardCacheNotRestoredReason = "CacheControlNoStore" BackForwardCacheNotRestoredReasonCacheControlNoStoreCookieModified BackForwardCacheNotRestoredReason = "CacheControlNoStoreCookieModified" BackForwardCacheNotRestoredReasonCacheControlNoStoreHTTPOnlyCookieModified BackForwardCacheNotRestoredReason = "CacheControlNoStoreHTTPOnlyCookieModified" BackForwardCacheNotRestoredReasonNoResponseHead BackForwardCacheNotRestoredReason = "NoResponseHead" BackForwardCacheNotRestoredReasonUnknown BackForwardCacheNotRestoredReason = "Unknown" BackForwardCacheNotRestoredReasonErrorDocument BackForwardCacheNotRestoredReason = "ErrorDocument" BackForwardCacheNotRestoredReasonFencedFramesEmbedder BackForwardCacheNotRestoredReason = "FencedFramesEmbedder" BackForwardCacheNotRestoredReasonCookieDisabled BackForwardCacheNotRestoredReason = "CookieDisabled" BackForwardCacheNotRestoredReasonHTTPAuthRequired BackForwardCacheNotRestoredReason = "HTTPAuthRequired" BackForwardCacheNotRestoredReasonCookieFlushed BackForwardCacheNotRestoredReason = "CookieFlushed" BackForwardCacheNotRestoredReasonBroadcastChannelOnMessage BackForwardCacheNotRestoredReason = "BroadcastChannelOnMessage" BackForwardCacheNotRestoredReasonWebViewSettingsChanged BackForwardCacheNotRestoredReason = "WebViewSettingsChanged" BackForwardCacheNotRestoredReasonWebViewJavaScriptObjectChanged BackForwardCacheNotRestoredReason = "WebViewJavaScriptObjectChanged" BackForwardCacheNotRestoredReasonWebViewMessageListenerInjected BackForwardCacheNotRestoredReason = "WebViewMessageListenerInjected" BackForwardCacheNotRestoredReasonWebViewSafeBrowsingAllowlistChanged BackForwardCacheNotRestoredReason = "WebViewSafeBrowsingAllowlistChanged" BackForwardCacheNotRestoredReasonWebViewDocumentStartJavascriptChanged BackForwardCacheNotRestoredReason = "WebViewDocumentStartJavascriptChanged" BackForwardCacheNotRestoredReasonWebSocket BackForwardCacheNotRestoredReason = "WebSocket" BackForwardCacheNotRestoredReasonWebTransport BackForwardCacheNotRestoredReason = "WebTransport" BackForwardCacheNotRestoredReasonWebRTC BackForwardCacheNotRestoredReason = "WebRTC" BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoStore BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoStore" BackForwardCacheNotRestoredReasonMainResourceHasCacheControlNoCache BackForwardCacheNotRestoredReason = "MainResourceHasCacheControlNoCache" BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoStore BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoStore" BackForwardCacheNotRestoredReasonSubresourceHasCacheControlNoCache BackForwardCacheNotRestoredReason = "SubresourceHasCacheControlNoCache" BackForwardCacheNotRestoredReasonContainsPlugins BackForwardCacheNotRestoredReason = "ContainsPlugins" BackForwardCacheNotRestoredReasonDocumentLoaded BackForwardCacheNotRestoredReason = "DocumentLoaded" BackForwardCacheNotRestoredReasonOutstandingNetworkRequestOthers BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestOthers" BackForwardCacheNotRestoredReasonRequestedMIDIPermission BackForwardCacheNotRestoredReason = "RequestedMIDIPermission" BackForwardCacheNotRestoredReasonRequestedAudioCapturePermission BackForwardCacheNotRestoredReason = "RequestedAudioCapturePermission" BackForwardCacheNotRestoredReasonRequestedVideoCapturePermission BackForwardCacheNotRestoredReason = "RequestedVideoCapturePermission" BackForwardCacheNotRestoredReasonRequestedBackForwardCacheBlockedSensors BackForwardCacheNotRestoredReason = "RequestedBackForwardCacheBlockedSensors" BackForwardCacheNotRestoredReasonRequestedBackgroundWorkPermission BackForwardCacheNotRestoredReason = "RequestedBackgroundWorkPermission" BackForwardCacheNotRestoredReasonBroadcastChannel BackForwardCacheNotRestoredReason = "BroadcastChannel" BackForwardCacheNotRestoredReasonWebXR BackForwardCacheNotRestoredReason = "WebXR" BackForwardCacheNotRestoredReasonWebLocks BackForwardCacheNotRestoredReason = "WebLocks" BackForwardCacheNotRestoredReasonWebHID BackForwardCacheNotRestoredReason = "WebHID" BackForwardCacheNotRestoredReasonRequestedStorageAccessGrant BackForwardCacheNotRestoredReason = "RequestedStorageAccessGrant" BackForwardCacheNotRestoredReasonWebNfc BackForwardCacheNotRestoredReason = "WebNfc" BackForwardCacheNotRestoredReasonOutstandingNetworkRequestFetch BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestFetch" BackForwardCacheNotRestoredReasonOutstandingNetworkRequestXHR BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestXHR" BackForwardCacheNotRestoredReasonAppBanner BackForwardCacheNotRestoredReason = "AppBanner" BackForwardCacheNotRestoredReasonPrinting BackForwardCacheNotRestoredReason = "Printing" BackForwardCacheNotRestoredReasonWebDatabase BackForwardCacheNotRestoredReason = "WebDatabase" BackForwardCacheNotRestoredReasonPictureInPicture BackForwardCacheNotRestoredReason = "PictureInPicture" BackForwardCacheNotRestoredReasonSpeechRecognizer BackForwardCacheNotRestoredReason = "SpeechRecognizer" BackForwardCacheNotRestoredReasonIdleManager BackForwardCacheNotRestoredReason = "IdleManager" BackForwardCacheNotRestoredReasonPaymentManager BackForwardCacheNotRestoredReason = "PaymentManager" BackForwardCacheNotRestoredReasonSpeechSynthesis BackForwardCacheNotRestoredReason = "SpeechSynthesis" BackForwardCacheNotRestoredReasonKeyboardLock BackForwardCacheNotRestoredReason = "KeyboardLock" BackForwardCacheNotRestoredReasonWebOTPService BackForwardCacheNotRestoredReason = "WebOTPService" BackForwardCacheNotRestoredReasonOutstandingNetworkRequestDirectSocket BackForwardCacheNotRestoredReason = "OutstandingNetworkRequestDirectSocket" BackForwardCacheNotRestoredReasonInjectedJavascript BackForwardCacheNotRestoredReason = "InjectedJavascript" BackForwardCacheNotRestoredReasonInjectedStyleSheet BackForwardCacheNotRestoredReason = "InjectedStyleSheet" BackForwardCacheNotRestoredReasonKeepaliveRequest BackForwardCacheNotRestoredReason = "KeepaliveRequest" BackForwardCacheNotRestoredReasonIndexedDBEvent BackForwardCacheNotRestoredReason = "IndexedDBEvent" BackForwardCacheNotRestoredReasonDummy BackForwardCacheNotRestoredReason = "Dummy" BackForwardCacheNotRestoredReasonJsNetworkRequestReceivedCacheControlNoStoreResource BackForwardCacheNotRestoredReason = "JsNetworkRequestReceivedCacheControlNoStoreResource" BackForwardCacheNotRestoredReasonWebRTCSticky BackForwardCacheNotRestoredReason = "WebRTCSticky" BackForwardCacheNotRestoredReasonWebTransportSticky BackForwardCacheNotRestoredReason = "WebTransportSticky" BackForwardCacheNotRestoredReasonWebSocketSticky BackForwardCacheNotRestoredReason = "WebSocketSticky" BackForwardCacheNotRestoredReasonSmartCard BackForwardCacheNotRestoredReason = "SmartCard" BackForwardCacheNotRestoredReasonLiveMediaStreamTrack BackForwardCacheNotRestoredReason = "LiveMediaStreamTrack" BackForwardCacheNotRestoredReasonUnloadHandler BackForwardCacheNotRestoredReason = "UnloadHandler" BackForwardCacheNotRestoredReasonParserAborted BackForwardCacheNotRestoredReason = "ParserAborted" BackForwardCacheNotRestoredReasonContentSecurityHandler BackForwardCacheNotRestoredReason = "ContentSecurityHandler" BackForwardCacheNotRestoredReasonContentWebAuthenticationAPI BackForwardCacheNotRestoredReason = "ContentWebAuthenticationAPI" BackForwardCacheNotRestoredReasonContentFileChooser BackForwardCacheNotRestoredReason = "ContentFileChooser" BackForwardCacheNotRestoredReasonContentSerial BackForwardCacheNotRestoredReason = "ContentSerial" BackForwardCacheNotRestoredReasonContentFileSystemAccess BackForwardCacheNotRestoredReason = "ContentFileSystemAccess" BackForwardCacheNotRestoredReasonContentMediaDevicesDispatcherHost BackForwardCacheNotRestoredReason = "ContentMediaDevicesDispatcherHost" BackForwardCacheNotRestoredReasonContentWebBluetooth BackForwardCacheNotRestoredReason = "ContentWebBluetooth" BackForwardCacheNotRestoredReasonContentWebUSB BackForwardCacheNotRestoredReason = "ContentWebUSB" BackForwardCacheNotRestoredReasonContentMediaSessionService BackForwardCacheNotRestoredReason = "ContentMediaSessionService" BackForwardCacheNotRestoredReasonContentScreenReader BackForwardCacheNotRestoredReason = "ContentScreenReader" BackForwardCacheNotRestoredReasonContentDiscarded BackForwardCacheNotRestoredReason = "ContentDiscarded" BackForwardCacheNotRestoredReasonEmbedderPopupBlockerTabHelper BackForwardCacheNotRestoredReason = "EmbedderPopupBlockerTabHelper" BackForwardCacheNotRestoredReasonEmbedderSafeBrowsingTriggeredPopupBlocker BackForwardCacheNotRestoredReason = "EmbedderSafeBrowsingTriggeredPopupBlocker" BackForwardCacheNotRestoredReasonEmbedderSafeBrowsingThreatDetails BackForwardCacheNotRestoredReason = "EmbedderSafeBrowsingThreatDetails" BackForwardCacheNotRestoredReasonEmbedderAppBannerManager BackForwardCacheNotRestoredReason = "EmbedderAppBannerManager" BackForwardCacheNotRestoredReasonEmbedderDomDistillerViewerSource BackForwardCacheNotRestoredReason = "EmbedderDomDistillerViewerSource" BackForwardCacheNotRestoredReasonEmbedderDomDistillerSelfDeletingRequestDelegate BackForwardCacheNotRestoredReason = "EmbedderDomDistillerSelfDeletingRequestDelegate" BackForwardCacheNotRestoredReasonEmbedderOomInterventionTabHelper BackForwardCacheNotRestoredReason = "EmbedderOomInterventionTabHelper" BackForwardCacheNotRestoredReasonEmbedderOfflinePage BackForwardCacheNotRestoredReason = "EmbedderOfflinePage" BackForwardCacheNotRestoredReasonEmbedderChromePasswordManagerClientBindCredentialManager BackForwardCacheNotRestoredReason = "EmbedderChromePasswordManagerClientBindCredentialManager" BackForwardCacheNotRestoredReasonEmbedderPermissionRequestManager BackForwardCacheNotRestoredReason = "EmbedderPermissionRequestManager" BackForwardCacheNotRestoredReasonEmbedderModalDialog BackForwardCacheNotRestoredReason = "EmbedderModalDialog" BackForwardCacheNotRestoredReasonEmbedderExtensions BackForwardCacheNotRestoredReason = "EmbedderExtensions" BackForwardCacheNotRestoredReasonEmbedderExtensionMessaging BackForwardCacheNotRestoredReason = "EmbedderExtensionMessaging" BackForwardCacheNotRestoredReasonEmbedderExtensionMessagingForOpenPort BackForwardCacheNotRestoredReason = "EmbedderExtensionMessagingForOpenPort" BackForwardCacheNotRestoredReasonEmbedderExtensionSentMessageToCachedFrame BackForwardCacheNotRestoredReason = "EmbedderExtensionSentMessageToCachedFrame" BackForwardCacheNotRestoredReasonRequestedByWebViewClient BackForwardCacheNotRestoredReason = "RequestedByWebViewClient" BackForwardCacheNotRestoredReasonPostMessageByWebViewClient BackForwardCacheNotRestoredReason = "PostMessageByWebViewClient" BackForwardCacheNotRestoredReasonCacheControlNoStoreDeviceBoundSessionTerminated BackForwardCacheNotRestoredReason = "CacheControlNoStoreDeviceBoundSessionTerminated" )
BackForwardCacheNotRestoredReason values.
func (BackForwardCacheNotRestoredReason) String ¶
func (t BackForwardCacheNotRestoredReason) String() string
String returns the BackForwardCacheNotRestoredReason as string value.
func (*BackForwardCacheNotRestoredReason) UnmarshalJSON ¶
func (t *BackForwardCacheNotRestoredReason) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type BackForwardCacheNotRestoredReasonType ¶
type BackForwardCacheNotRestoredReasonType string
BackForwardCacheNotRestoredReasonType types of not restored reasons for back-forward cache.
const ( BackForwardCacheNotRestoredReasonTypeSupportPending BackForwardCacheNotRestoredReasonType = "SupportPending" BackForwardCacheNotRestoredReasonTypePageSupportNeeded BackForwardCacheNotRestoredReasonType = "PageSupportNeeded" BackForwardCacheNotRestoredReasonTypeCircumstantial BackForwardCacheNotRestoredReasonType = "Circumstantial" )
BackForwardCacheNotRestoredReasonType values.
func (BackForwardCacheNotRestoredReasonType) String ¶
func (t BackForwardCacheNotRestoredReasonType) String() string
String returns the BackForwardCacheNotRestoredReasonType as string value.
func (*BackForwardCacheNotRestoredReasonType) UnmarshalJSON ¶
func (t *BackForwardCacheNotRestoredReasonType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type BringToFrontParams ¶
type BringToFrontParams struct{}
BringToFrontParams brings page to front (activates tab).
func BringToFront ¶
func BringToFront() *BringToFrontParams
BringToFront brings page to front (activates tab).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-bringToFront
type CaptureScreenshotFormat ¶
type CaptureScreenshotFormat string
CaptureScreenshotFormat image compression format (defaults to png).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureScreenshot
const ( CaptureScreenshotFormatJpeg CaptureScreenshotFormat = "jpeg" CaptureScreenshotFormatPng CaptureScreenshotFormat = "png" CaptureScreenshotFormatWebp CaptureScreenshotFormat = "webp" )
CaptureScreenshotFormat values.
func (CaptureScreenshotFormat) String ¶
func (t CaptureScreenshotFormat) String() string
String returns the CaptureScreenshotFormat as string value.
func (*CaptureScreenshotFormat) UnmarshalJSON ¶
func (t *CaptureScreenshotFormat) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type CaptureScreenshotParams ¶
type CaptureScreenshotParams struct { Format CaptureScreenshotFormat `json:"format,omitempty,omitzero"` // Image compression format (defaults to png). Quality int64 `json:"quality,omitempty,omitzero"` // Compression quality from range [0..100] (jpeg only). Clip *Viewport `json:"clip,omitempty,omitzero"` // Capture the screenshot of a given region only. FromSurface bool `json:"fromSurface,omitempty,omitzero"` // Capture the screenshot from the surface, rather than the view. Defaults to true. CaptureBeyondViewport bool `json:"captureBeyondViewport,omitempty,omitzero"` // Capture the screenshot beyond the viewport. Defaults to false. OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty,omitzero"` // Optimize image encoding for speed, not for resulting size (defaults to false) }
CaptureScreenshotParams capture page screenshot.
func CaptureScreenshot ¶
func CaptureScreenshot() *CaptureScreenshotParams
CaptureScreenshot capture page screenshot.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureScreenshot
parameters:
func (*CaptureScreenshotParams) Do ¶
func (p *CaptureScreenshotParams) Do(ctx context.Context) (data []byte, err error)
Do executes Page.captureScreenshot against the provided context.
returns:
data - Base64-encoded image data.
func (CaptureScreenshotParams) WithCaptureBeyondViewport ¶
func (p CaptureScreenshotParams) WithCaptureBeyondViewport(captureBeyondViewport bool) *CaptureScreenshotParams
WithCaptureBeyondViewport capture the screenshot beyond the viewport. Defaults to false.
func (CaptureScreenshotParams) WithClip ¶
func (p CaptureScreenshotParams) WithClip(clip *Viewport) *CaptureScreenshotParams
WithClip capture the screenshot of a given region only.
func (CaptureScreenshotParams) WithFormat ¶
func (p CaptureScreenshotParams) WithFormat(format CaptureScreenshotFormat) *CaptureScreenshotParams
WithFormat image compression format (defaults to png).
func (CaptureScreenshotParams) WithFromSurface ¶
func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams
WithFromSurface capture the screenshot from the surface, rather than the view. Defaults to true.
func (CaptureScreenshotParams) WithOptimizeForSpeed ¶
func (p CaptureScreenshotParams) WithOptimizeForSpeed(optimizeForSpeed bool) *CaptureScreenshotParams
WithOptimizeForSpeed optimize image encoding for speed, not for resulting size (defaults to false).
func (CaptureScreenshotParams) WithQuality ¶
func (p CaptureScreenshotParams) WithQuality(quality int64) *CaptureScreenshotParams
WithQuality compression quality from range [0..100] (jpeg only).
type CaptureScreenshotReturns ¶
type CaptureScreenshotReturns struct {
Data string `json:"data,omitempty,omitzero"` // Base64-encoded image data.
}
CaptureScreenshotReturns return values.
type CaptureSnapshotFormat ¶
type CaptureSnapshotFormat string
CaptureSnapshotFormat format (defaults to mhtml).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureSnapshot
const (
CaptureSnapshotFormatMhtml CaptureSnapshotFormat = "mhtml"
)
CaptureSnapshotFormat values.
func (CaptureSnapshotFormat) String ¶
func (t CaptureSnapshotFormat) String() string
String returns the CaptureSnapshotFormat as string value.
func (*CaptureSnapshotFormat) UnmarshalJSON ¶
func (t *CaptureSnapshotFormat) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type CaptureSnapshotParams ¶
type CaptureSnapshotParams struct {
Format CaptureSnapshotFormat `json:"format,omitempty,omitzero"` // Format (defaults to mhtml).
}
CaptureSnapshotParams returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
func CaptureSnapshot ¶
func CaptureSnapshot() *CaptureSnapshotParams
CaptureSnapshot returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-captureSnapshot
parameters:
func (*CaptureSnapshotParams) Do ¶
func (p *CaptureSnapshotParams) Do(ctx context.Context) (data string, err error)
Do executes Page.captureSnapshot against the provided context.
returns:
data - Serialized page data.
func (CaptureSnapshotParams) WithFormat ¶
func (p CaptureSnapshotParams) WithFormat(format CaptureSnapshotFormat) *CaptureSnapshotParams
WithFormat format (defaults to mhtml).
type CaptureSnapshotReturns ¶
type CaptureSnapshotReturns struct {
Data string `json:"data,omitempty,omitzero"` // Serialized page data.
}
CaptureSnapshotReturns return values.
type ClearCompilationCacheParams ¶
type ClearCompilationCacheParams struct{}
ClearCompilationCacheParams clears seeded compilation cache.
func ClearCompilationCache ¶
func ClearCompilationCache() *ClearCompilationCacheParams
ClearCompilationCache clears seeded compilation cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-clearCompilationCache
type ClientNavigationDisposition ¶
type ClientNavigationDisposition string
ClientNavigationDisposition [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ClientNavigationDisposition
const ()
ClientNavigationDisposition values.
func (ClientNavigationDisposition) String ¶
func (t ClientNavigationDisposition) String() string
String returns the ClientNavigationDisposition as string value.
func (*ClientNavigationDisposition) UnmarshalJSON ¶
func (t *ClientNavigationDisposition) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type ClientNavigationReason ¶
type ClientNavigationReason string
ClientNavigationReason [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ClientNavigationReason
const ()
ClientNavigationReason values.
func (ClientNavigationReason) String ¶
func (t ClientNavigationReason) String() string
String returns the ClientNavigationReason as string value.
func (*ClientNavigationReason) UnmarshalJSON ¶
func (t *ClientNavigationReason) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type CloseParams ¶
type CloseParams struct{}
CloseParams tries to close page, running its beforeunload hooks, if any.
func Close ¶
func Close() *CloseParams
Close tries to close page, running its beforeunload hooks, if any.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-close
type CompilationCacheParams ¶
type CompilationCacheParams struct { URL string `json:"url"` // The URL of the script to produce a compilation cache entry for. Eager bool `json:"eager,omitempty,omitzero"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion). }
CompilationCacheParams per-script compilation cache parameters for Page.produceCompilationCache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-CompilationCacheParams
type CrashParams ¶
type CrashParams struct{}
CrashParams crashes renderer on the IO thread, generates minidumps.
func Crash ¶
func Crash() *CrashParams
Crash crashes renderer on the IO thread, generates minidumps.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-crash
type CreateIsolatedWorldParams ¶
type CreateIsolatedWorldParams struct { FrameID cdp.FrameID `json:"frameId"` // Id of the frame in which the isolated world should be created. WorldName string `json:"worldName,omitempty,omitzero"` // An optional name which is reported in the Execution Context. GrantUniveralAccess bool `json:"grantUniveralAccess,omitempty,omitzero"` // Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. }
CreateIsolatedWorldParams creates an isolated world for the given frame.
func CreateIsolatedWorld ¶
func CreateIsolatedWorld(frameID cdp.FrameID) *CreateIsolatedWorldParams
CreateIsolatedWorld creates an isolated world for the given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-createIsolatedWorld
parameters:
frameID - Id of the frame in which the isolated world should be created.
func (*CreateIsolatedWorldParams) Do ¶
func (p *CreateIsolatedWorldParams) Do(ctx context.Context) (executionContextID runtime.ExecutionContextID, err error)
Do executes Page.createIsolatedWorld against the provided context.
returns:
executionContextID - Execution context of the isolated world.
func (CreateIsolatedWorldParams) WithGrantUniveralAccess ¶
func (p CreateIsolatedWorldParams) WithGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldParams
WithGrantUniveralAccess whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
func (CreateIsolatedWorldParams) WithWorldName ¶
func (p CreateIsolatedWorldParams) WithWorldName(worldName string) *CreateIsolatedWorldParams
WithWorldName an optional name which is reported in the Execution Context.
type CreateIsolatedWorldReturns ¶
type CreateIsolatedWorldReturns struct {
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId,omitempty,omitzero"` // Execution context of the isolated world.
}
CreateIsolatedWorldReturns return values.
type DialogType ¶
type DialogType string
DialogType javascript dialog type.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-DialogType
const ( DialogTypeAlert DialogType = "alert" DialogTypeConfirm DialogType = "confirm" DialogTypePrompt DialogType = "prompt" DialogTypeBeforeunload DialogType = "beforeunload" )
DialogType values.
func (DialogType) String ¶
func (t DialogType) String() string
String returns the DialogType as string value.
func (*DialogType) UnmarshalJSON ¶
func (t *DialogType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type DisableParams ¶
type DisableParams struct{}
DisableParams disables page domain notifications.
func Disable ¶
func Disable() *DisableParams
Disable disables page domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-disable
type EnableParams ¶
type EnableParams struct {
EnableFileChooserOpenedEvent bool `json:"enableFileChooserOpenedEvent,omitempty,omitzero"` // If true, the Page.fileChooserOpened event will be emitted regardless of the state set by Page.setInterceptFileChooserDialog command (default: false).
}
EnableParams enables page domain notifications.
func Enable ¶
func Enable() *EnableParams
Enable enables page domain notifications.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-enable
parameters:
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctx context.Context) (err error)
Do executes Page.enable against the provided context.
func (EnableParams) WithEnableFileChooserOpenedEvent ¶
func (p EnableParams) WithEnableFileChooserOpenedEvent(enableFileChooserOpenedEvent bool) *EnableParams
WithEnableFileChooserOpenedEvent if true, the Page.fileChooserOpened event will be emitted regardless of the state set by Page.setInterceptFileChooserDialog command (default: false).
type EventBackForwardCacheNotUsed ¶
type EventBackForwardCacheNotUsed struct { LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navigation. FrameID cdp.FrameID `json:"frameId"` // The frame id of the associated frame. NotRestoredExplanations []*BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty. NotRestoredExplanationsTree *BackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty,omitzero"` // Tree structure of reasons why the page could not be cached for each frame. }
EventBackForwardCacheNotUsed fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-backForwardCacheNotUsed
type EventCompilationCacheProduced ¶
type EventCompilationCacheProduced struct { URL string `json:"url"` Data string `json:"data"` // Base64-encoded data }
EventCompilationCacheProduced issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-compilationCacheProduced
type EventDocumentOpened ¶
EventDocumentOpened fired when opening document to write to.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-documentOpened
type EventDomContentEventFired ¶
type EventDomContentEventFired struct {
Timestamp *cdp.MonotonicTime `json:"timestamp"`
}
EventDomContentEventFired [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-domContentEventFired
type EventFileChooserOpened ¶
type EventFileChooserOpened struct { FrameID cdp.FrameID `json:"frameId"` // Id of the frame containing input node. Mode FileChooserOpenedMode `json:"mode"` // Input mode. BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty,omitzero"` // Input node id. Only present for file choosers opened via an <input type="file"> element. }
EventFileChooserOpened emitted only when page.interceptFileChooser is enabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
type EventFrameAttached ¶
type EventFrameAttached struct { FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been attached. ParentFrameID cdp.FrameID `json:"parentFrameId"` // Parent frame identifier. Stack *runtime.StackTrace `json:"stack,omitempty,omitzero"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script. }
EventFrameAttached fired when frame has been attached to its parent.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameAttached
type EventFrameDetached ¶
type EventFrameDetached struct { FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has been detached. Reason FrameDetachedReason `json:"reason"` }
EventFrameDetached fired when frame has been detached from its parent.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameDetached
type EventFrameNavigated ¶
type EventFrameNavigated struct {}
EventFrameNavigated fired once navigation of the frame has completed. Frame is now associated with the new loader.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameNavigated
type EventFrameRequestedNavigation ¶
type EventFrameRequestedNavigation struct {}
EventFrameRequestedNavigation fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameRequestedNavigation
type EventFrameResized ¶
type EventFrameResized struct{}
EventFrameResized [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameResized
type EventFrameStartedLoading ¶
type EventFrameStartedLoading struct {
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has started loading.
}
EventFrameStartedLoading fired when frame has started loading.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStartedLoading
type EventFrameStartedNavigating ¶
type EventFrameStartedNavigating struct {}
EventFrameStartedNavigating fired when a navigation starts. This event is fired for both renderer-initiated and browser-initiated navigations. For renderer-initiated navigations, the event is fired after frameRequestedNavigation. Navigation may still be cancelled after the event is issued. Multiple events can be fired for a single navigation, for example, when a same-document navigation becomes a cross-document navigation (such as in the case of a frameset).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStartedNavigating
type EventFrameStoppedLoading ¶
type EventFrameStoppedLoading struct {
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that has stopped loading.
}
EventFrameStoppedLoading fired when frame has stopped loading.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStoppedLoading
type EventFrameSubtreeWillBeDetached ¶
type EventFrameSubtreeWillBeDetached struct {
FrameID cdp.FrameID `json:"frameId"` // Id of the frame that is the root of the subtree that will be detached.
}
EventFrameSubtreeWillBeDetached fired before frame subtree is detached. Emitted before any frame of the subtree is actually detached.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameSubtreeWillBeDetached
type EventInterstitialHidden ¶
type EventInterstitialHidden struct{}
EventInterstitialHidden fired when interstitial page was hidden.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-interstitialHidden
type EventInterstitialShown ¶
type EventInterstitialShown struct{}
EventInterstitialShown fired when interstitial page was shown.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-interstitialShown
type EventJavascriptDialogClosed ¶
type EventJavascriptDialogClosed struct { Result bool `json:"result"` // Whether dialog was confirmed. UserInput string `json:"userInput"` // User input in case of prompt. }
EventJavascriptDialogClosed fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-javascriptDialogClosed
type EventJavascriptDialogOpening ¶
type EventJavascriptDialogOpening struct { URL string `json:"url"` // Frame url. Message string `json:"message"` // Message that will be displayed by the dialog. Type DialogType `json:"type"` // Dialog type. HasBrowserHandler bool `json:"hasBrowserHandler"` // True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog. DefaultPrompt string `json:"defaultPrompt,omitempty,omitzero"` // Default dialog prompt. }
EventJavascriptDialogOpening fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-javascriptDialogOpening
type EventLifecycleEvent ¶
type EventLifecycleEvent struct { FrameID cdp.FrameID `json:"frameId"` // Id of the frame. LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker. Name string `json:"name"` Timestamp *cdp.MonotonicTime `json:"timestamp"` }
EventLifecycleEvent fired for lifecycle events (navigation, load, paint, etc) in the current target (including local frames).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-lifecycleEvent
type EventLoadEventFired ¶
type EventLoadEventFired struct {
Timestamp *cdp.MonotonicTime `json:"timestamp"`
}
EventLoadEventFired [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-loadEventFired
type EventNavigatedWithinDocument ¶
type EventNavigatedWithinDocument struct {}
EventNavigatedWithinDocument fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-navigatedWithinDocument
type EventScreencastFrame ¶
type EventScreencastFrame struct { Data string `json:"data"` // Base64-encoded compressed image. Metadata *ScreencastFrameMetadata `json:"metadata"` // Screencast frame metadata. SessionID int64 `json:"sessionId"` // Frame number. }
EventScreencastFrame compressed image data requested by the startScreencast.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-screencastFrame
type EventScreencastVisibilityChanged ¶
type EventScreencastVisibilityChanged struct {
Visible bool `json:"visible"` // True if the page is visible.
}
EventScreencastVisibilityChanged fired when the page with currently enabled screencast was shown or hidden .
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-screencastVisibilityChanged
type EventWindowOpen ¶
type EventWindowOpen struct { URL string `json:"url"` // The URL for the new window. WindowName string `json:"windowName"` // Window name. WindowFeatures []string `json:"windowFeatures"` // An array of enabled window features. UserGesture bool `json:"userGesture"` // Whether or not it was triggered by user gesture. }
EventWindowOpen fired when a new window is going to be opened, via window.open(), link click, form submission, etc.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-windowOpen
type FileChooserOpenedMode ¶
type FileChooserOpenedMode string
FileChooserOpenedMode input mode.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
const ( FileChooserOpenedModeSelectSingle FileChooserOpenedMode = "selectSingle" FileChooserOpenedModeSelectMultiple FileChooserOpenedMode = "selectMultiple" )
FileChooserOpenedMode values.
func (FileChooserOpenedMode) String ¶
func (t FileChooserOpenedMode) String() string
String returns the FileChooserOpenedMode as string value.
func (*FileChooserOpenedMode) UnmarshalJSON ¶
func (t *FileChooserOpenedMode) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type FileFilter ¶
type FileFilter struct { Name string `json:"name,omitempty,omitzero"` Accepts []string `json:"accepts,omitempty,omitzero"` }
FileFilter [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FileFilter
type FileHandler ¶
type FileHandler struct { Action string `json:"action"` Name string `json:"name"` Icons []*ImageResource `json:"icons,omitempty,omitzero"` Accepts []*FileFilter `json:"accepts,omitempty,omitzero"` // Mimic a map, name is the key, accepts is the value. LaunchType string `json:"launchType"` // Won't repeat the enums, using string for easy comparison. Same as the other enums below. }
FileHandler [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FileHandler
type FontFamilies ¶
type FontFamilies struct { Standard string `json:"standard,omitempty,omitzero"` // The standard font-family. Fixed string `json:"fixed,omitempty,omitzero"` // The fixed font-family. Serif string `json:"serif,omitempty,omitzero"` // The serif font-family. SansSerif string `json:"sansSerif,omitempty,omitzero"` // The sansSerif font-family. Cursive string `json:"cursive,omitempty,omitzero"` // The cursive font-family. Fantasy string `json:"fantasy,omitempty,omitzero"` // The fantasy font-family. Math string `json:"math,omitempty,omitzero"` // The math font-family. }
FontFamilies generic font families collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FontFamilies
type FontSizes ¶
type FontSizes struct { Standard int64 `json:"standard,omitempty,omitzero"` // Default standard font size. Fixed int64 `json:"fixed,omitempty,omitzero"` // Default fixed font size. }
FontSizes default font sizes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FontSizes
type FrameDetachedReason ¶
type FrameDetachedReason string
FrameDetachedReason [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameDetached
const ( FrameDetachedReasonRemove FrameDetachedReason = "remove" FrameDetachedReasonSwap FrameDetachedReason = "swap" )
FrameDetachedReason values.
func (FrameDetachedReason) String ¶
func (t FrameDetachedReason) String() string
String returns the FrameDetachedReason as string value.
func (*FrameDetachedReason) UnmarshalJSON ¶
func (t *FrameDetachedReason) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type FrameResource ¶
type FrameResource struct { URL string `json:"url"` // Resource URL. Type network.ResourceType `json:"type"` // Type of this resource. MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser. LastModified *cdp.TimeSinceEpoch `json:"lastModified,omitempty,omitzero"` // last-modified timestamp as reported by server. ContentSize float64 `json:"contentSize,omitempty,omitzero"` // Resource content size. Failed bool `json:"failed,omitempty,omitzero"` // True if the resource failed to load. Canceled bool `json:"canceled,omitempty,omitzero"` // True if the resource was canceled during loading. }
FrameResource information about the Resource on the page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameResource
type FrameResourceTree ¶
type FrameResourceTree struct { Frame *cdp.Frame `json:"frame"` // Frame information for this tree item. ChildFrames []*FrameResourceTree `json:"childFrames,omitempty,omitzero"` // Child frames. Resources []*FrameResource `json:"resources"` // Information about frame resources. }
FrameResourceTree information about the Frame hierarchy along with their cached resources.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameResourceTree
type FrameStartedNavigatingNavigationType ¶
type FrameStartedNavigatingNavigationType string
FrameStartedNavigatingNavigationType [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-frameStartedNavigating
const ()
FrameStartedNavigatingNavigationType values.
func (FrameStartedNavigatingNavigationType) String ¶
func (t FrameStartedNavigatingNavigationType) String() string
String returns the FrameStartedNavigatingNavigationType as string value.
func (*FrameStartedNavigatingNavigationType) UnmarshalJSON ¶
func (t *FrameStartedNavigatingNavigationType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type FrameTree ¶
type FrameTree struct { Frame *cdp.Frame `json:"frame"` // Frame information for this tree item. ChildFrames []*FrameTree `json:"childFrames,omitempty,omitzero"` // Child frames. }
FrameTree information about the Frame hierarchy.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameTree
type GenerateTestReportParams ¶
type GenerateTestReportParams struct { Message string `json:"message"` // Message to be displayed in the report. Group string `json:"group,omitempty,omitzero"` // Specifies the endpoint group to deliver the report to. }
GenerateTestReportParams generates a report for testing.
func GenerateTestReport ¶
func GenerateTestReport(message string) *GenerateTestReportParams
GenerateTestReport generates a report for testing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-generateTestReport
parameters:
message - Message to be displayed in the report.
func (*GenerateTestReportParams) Do ¶
func (p *GenerateTestReportParams) Do(ctx context.Context) (err error)
Do executes Page.generateTestReport against the provided context.
func (GenerateTestReportParams) WithGroup ¶
func (p GenerateTestReportParams) WithGroup(group string) *GenerateTestReportParams
WithGroup specifies the endpoint group to deliver the report to.
type GetAdScriptIDParams ¶
GetAdScriptIDParams [no description].
func GetAdScriptID ¶
func GetAdScriptID(frameID cdp.FrameID) *GetAdScriptIDParams
GetAdScriptID [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAdScriptId
parameters:
frameID
func (*GetAdScriptIDParams) Do ¶
func (p *GetAdScriptIDParams) Do(ctx context.Context) (adScriptID *AdScriptID, err error)
Do executes Page.getAdScriptId against the provided context.
returns:
adScriptID - Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
type GetAdScriptIDReturns ¶
type GetAdScriptIDReturns struct {
AdScriptID *AdScriptID `json:"adScriptId,omitempty,omitzero"` // Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.
}
GetAdScriptIDReturns return values.
type GetAppIDParams ¶
type GetAppIDParams struct{}
GetAppIDParams returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled.
func GetAppID ¶
func GetAppID() *GetAppIDParams
GetAppID returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAppId
type GetAppIDReturns ¶
type GetAppIDReturns struct { AppID string `json:"appId,omitempty,omitzero"` // App id, either from manifest's id attribute or computed from start_url RecommendedID string `json:"recommendedId,omitempty,omitzero"` // Recommendation for manifest's id attribute to match current id computed from start_url }
GetAppIDReturns return values.
type GetAppManifestParams ¶
type GetAppManifestParams struct {
ManifestID string `json:"manifestId,omitempty,omitzero"`
}
GetAppManifestParams gets the processed manifest for this current document. This API always waits for the manifest to be loaded. If manifestId is provided, and it does not match the manifest of the current document, this API errors out. If there is not a loaded page, this API errors out immediately.
func GetAppManifest ¶
func GetAppManifest() *GetAppManifestParams
GetAppManifest gets the processed manifest for this current document. This API always waits for the manifest to be loaded. If manifestId is provided, and it does not match the manifest of the current document, this API errors out. If there is not a loaded page, this API errors out immediately.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAppManifest
parameters:
func (*GetAppManifestParams) Do ¶
func (p *GetAppManifestParams) Do(ctx context.Context) (url string, errors []*AppManifestError, data string, manifest *WebAppManifest, err error)
Do executes Page.getAppManifest against the provided context.
returns:
url - Manifest location. errors data - Manifest content. manifest
func (GetAppManifestParams) WithManifestID ¶
func (p GetAppManifestParams) WithManifestID(manifestID string) *GetAppManifestParams
WithManifestID [no description].
type GetAppManifestReturns ¶
type GetAppManifestReturns struct { URL string `json:"url,omitempty,omitzero"` // Manifest location. Errors []*AppManifestError `json:"errors,omitempty,omitzero"` Data string `json:"data,omitempty,omitzero"` // Manifest content. Manifest *WebAppManifest `json:"manifest,omitempty,omitzero"` }
GetAppManifestReturns return values.
type GetFrameTreeParams ¶
type GetFrameTreeParams struct{}
GetFrameTreeParams returns present frame tree structure.
func GetFrameTree ¶
func GetFrameTree() *GetFrameTreeParams
GetFrameTree returns present frame tree structure.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getFrameTree
type GetFrameTreeReturns ¶
type GetFrameTreeReturns struct {
FrameTree *FrameTree `json:"frameTree,omitempty,omitzero"` // Present frame tree structure.
}
GetFrameTreeReturns return values.
type GetInstallabilityErrorsParams ¶
type GetInstallabilityErrorsParams struct{}
GetInstallabilityErrorsParams [no description].
func GetInstallabilityErrors ¶
func GetInstallabilityErrors() *GetInstallabilityErrorsParams
GetInstallabilityErrors [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getInstallabilityErrors
func (*GetInstallabilityErrorsParams) Do ¶
func (p *GetInstallabilityErrorsParams) Do(ctx context.Context) (installabilityErrors []*InstallabilityError, err error)
Do executes Page.getInstallabilityErrors against the provided context.
returns:
installabilityErrors
type GetInstallabilityErrorsReturns ¶
type GetInstallabilityErrorsReturns struct {
InstallabilityErrors []*InstallabilityError `json:"installabilityErrors,omitempty,omitzero"`
}
GetInstallabilityErrorsReturns return values.
type GetLayoutMetricsParams ¶
type GetLayoutMetricsParams struct{}
GetLayoutMetricsParams returns metrics relating to the layouting of the page, such as viewport bounds/scale.
func GetLayoutMetrics ¶
func GetLayoutMetrics() *GetLayoutMetricsParams
GetLayoutMetrics returns metrics relating to the layouting of the page, such as viewport bounds/scale.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getLayoutMetrics
func (*GetLayoutMetricsParams) Do ¶
func (p *GetLayoutMetricsParams) Do(ctx context.Context) (layoutViewport *LayoutViewport, visualViewport *VisualViewport, contentSize *dom.Rect, cssLayoutViewport *LayoutViewport, cssVisualViewport *VisualViewport, cssContentSize *dom.Rect, err error)
Do executes Page.getLayoutMetrics against the provided context.
returns:
layoutViewport - Deprecated metrics relating to the layout viewport. Is in device pixels. Use cssLayoutViewport instead. visualViewport - Deprecated metrics relating to the visual viewport. Is in device pixels. Use cssVisualViewport instead. contentSize - Deprecated size of scrollable area. Is in DP. Use cssContentSize instead. cssLayoutViewport - Metrics relating to the layout viewport in CSS pixels. cssVisualViewport - Metrics relating to the visual viewport in CSS pixels. cssContentSize - Size of scrollable area in CSS pixels.
type GetLayoutMetricsReturns ¶
type GetLayoutMetricsReturns struct { LayoutViewport *LayoutViewport `json:"layoutViewport"` // Deprecated metrics relating to the layout viewport. Is in device pixels. Use cssLayoutViewport instead. VisualViewport *VisualViewport `json:"visualViewport"` // Deprecated metrics relating to the visual viewport. Is in device pixels. Use cssVisualViewport instead. ContentSize *dom.Rect `json:"contentSize"` // Deprecated size of scrollable area. Is in DP. Use cssContentSize instead. CSSLayoutViewport *LayoutViewport `json:"cssLayoutViewport"` // Metrics relating to the layout viewport in CSS pixels. CSSVisualViewport *VisualViewport `json:"cssVisualViewport"` // Metrics relating to the visual viewport in CSS pixels. CSSContentSize *dom.Rect `json:"cssContentSize"` // Size of scrollable area in CSS pixels. }
GetLayoutMetricsReturns return values.
type GetNavigationHistoryParams ¶
type GetNavigationHistoryParams struct{}
GetNavigationHistoryParams returns navigation history for the current page.
func GetNavigationHistory ¶
func GetNavigationHistory() *GetNavigationHistoryParams
GetNavigationHistory returns navigation history for the current page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getNavigationHistory
func (*GetNavigationHistoryParams) Do ¶
func (p *GetNavigationHistoryParams) Do(ctx context.Context) (currentIndex int64, entries []*NavigationEntry, err error)
Do executes Page.getNavigationHistory against the provided context.
returns:
currentIndex - Index of the current navigation history entry. entries - Array of navigation history entries.
type GetNavigationHistoryReturns ¶
type GetNavigationHistoryReturns struct {}
GetNavigationHistoryReturns return values.
type GetOriginTrialsParams ¶
GetOriginTrialsParams get Origin Trials on given frame.
func GetOriginTrials ¶
func GetOriginTrials(frameID cdp.FrameID) *GetOriginTrialsParams
GetOriginTrials get Origin Trials on given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getOriginTrials
parameters:
frameID
func (*GetOriginTrialsParams) Do ¶
func (p *GetOriginTrialsParams) Do(ctx context.Context) (originTrials []*cdp.OriginTrial, err error)
Do executes Page.getOriginTrials against the provided context.
returns:
originTrials
type GetOriginTrialsReturns ¶
type GetOriginTrialsReturns struct {
OriginTrials []*cdp.OriginTrial `json:"originTrials,omitempty,omitzero"`
}
GetOriginTrialsReturns return values.
type GetPermissionsPolicyStateParams ¶
GetPermissionsPolicyStateParams get Permissions Policy state on given frame.
func GetPermissionsPolicyState ¶
func GetPermissionsPolicyState(frameID cdp.FrameID) *GetPermissionsPolicyStateParams
GetPermissionsPolicyState get Permissions Policy state on given frame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getPermissionsPolicyState
parameters:
frameID
func (*GetPermissionsPolicyStateParams) Do ¶
func (p *GetPermissionsPolicyStateParams) Do(ctx context.Context) (states []*PermissionsPolicyFeatureState, err error)
Do executes Page.getPermissionsPolicyState against the provided context.
returns:
states
type GetPermissionsPolicyStateReturns ¶
type GetPermissionsPolicyStateReturns struct {
States []*PermissionsPolicyFeatureState `json:"states,omitempty,omitzero"`
}
GetPermissionsPolicyStateReturns return values.
type GetResourceContentParams ¶
type GetResourceContentParams struct { FrameID cdp.FrameID `json:"frameId"` // Frame id to get resource for. URL string `json:"url"` // URL of the resource to get content for. }
GetResourceContentParams returns content of the given resource.
func GetResourceContent ¶
func GetResourceContent(frameID cdp.FrameID, url string) *GetResourceContentParams
GetResourceContent returns content of the given resource.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceContent
parameters:
frameID - Frame id to get resource for. url - URL of the resource to get content for.
type GetResourceContentReturns ¶
type GetResourceContentReturns struct { Content string `json:"content,omitempty,omitzero"` // Resource content. Base64encoded bool `json:"base64Encoded,omitempty,omitzero"` // True, if content was served as base64. }
GetResourceContentReturns return values.
type GetResourceTreeParams ¶
type GetResourceTreeParams struct{}
GetResourceTreeParams returns present frame / resource tree structure.
func GetResourceTree ¶
func GetResourceTree() *GetResourceTreeParams
GetResourceTree returns present frame / resource tree structure.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceTree
func (*GetResourceTreeParams) Do ¶
func (p *GetResourceTreeParams) Do(ctx context.Context) (frameTree *FrameResourceTree, err error)
Do executes Page.getResourceTree against the provided context.
returns:
frameTree - Present frame / resource tree structure.
type GetResourceTreeReturns ¶
type GetResourceTreeReturns struct {
FrameTree *FrameResourceTree `json:"frameTree,omitempty,omitzero"` // Present frame / resource tree structure.
}
GetResourceTreeReturns return values.
type HandleJavaScriptDialogParams ¶
type HandleJavaScriptDialogParams struct { Accept bool `json:"accept"` // Whether to accept or dismiss the dialog. PromptText string `json:"promptText,omitempty,omitzero"` // The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog. }
HandleJavaScriptDialogParams accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
func HandleJavaScriptDialog ¶
func HandleJavaScriptDialog(accept bool) *HandleJavaScriptDialogParams
HandleJavaScriptDialog accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-handleJavaScriptDialog
parameters:
accept - Whether to accept or dismiss the dialog.
func (*HandleJavaScriptDialogParams) Do ¶
func (p *HandleJavaScriptDialogParams) Do(ctx context.Context) (err error)
Do executes Page.handleJavaScriptDialog against the provided context.
func (HandleJavaScriptDialogParams) WithPromptText ¶
func (p HandleJavaScriptDialogParams) WithPromptText(promptText string) *HandleJavaScriptDialogParams
WithPromptText the text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
type ImageResource ¶
type ImageResource struct { URL string `json:"url"` // The src field in the definition, but changing to url in favor of consistency. Sizes string `json:"sizes,omitempty,omitzero"` Type string `json:"type,omitempty,omitzero"` }
ImageResource the image definition used in both icon and screenshot.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ImageResource
type InstallabilityError ¶
type InstallabilityError struct { ErrorID string `json:"errorId"` // The error id (e.g. 'manifest-missing-suitable-icon'). ErrorArguments []*InstallabilityErrorArgument `json:"errorArguments"` // The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}). }
InstallabilityError the installability error.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-InstallabilityError
type InstallabilityErrorArgument ¶
type InstallabilityErrorArgument struct { Name string `json:"name"` // Argument name (e.g. name:'minimum-icon-size-in-pixels'). Value string `json:"value"` // Argument value (e.g. value:'64'). }
InstallabilityErrorArgument [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-InstallabilityErrorArgument
type LaunchHandler ¶
type LaunchHandler struct {
ClientMode string `json:"clientMode"`
}
LaunchHandler [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-LaunchHandler
type LayoutViewport ¶
type LayoutViewport struct { PageX int64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels). PageY int64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels). ClientWidth int64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present. ClientHeight int64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present. }
LayoutViewport layout viewport position and dimensions.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-LayoutViewport
type NavigateParams ¶
type NavigateParams struct {}
NavigateParams navigates current page to the given URL.
func Navigate ¶
func Navigate(url string) *NavigateParams
Navigate navigates current page to the given URL.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigate
parameters:
url - URL to navigate the page to.
func (*NavigateParams) Do ¶
func (p *NavigateParams) Do(ctx context.Context) (frameID cdp.FrameID, loaderID cdp.LoaderID, errorText string, err error)
Do executes Page.navigate against the provided context.
returns:
frameID - Frame id that has navigated (or failed to navigate) loaderID - Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change. errorText - User friendly error message, present if and only if navigation has failed.
func (NavigateParams) WithFrameID ¶
func (p NavigateParams) WithFrameID(frameID cdp.FrameID) *NavigateParams
WithFrameID frame id to navigate, if not specified navigates the top frame.
func (NavigateParams) WithReferrer ¶
func (p NavigateParams) WithReferrer(referrer string) *NavigateParams
WithReferrer referrer URL.
func (NavigateParams) WithReferrerPolicy ¶
func (p NavigateParams) WithReferrerPolicy(referrerPolicy ReferrerPolicy) *NavigateParams
WithReferrerPolicy referrer-policy used for the navigation.
func (NavigateParams) WithTransitionType ¶
func (p NavigateParams) WithTransitionType(transitionType TransitionType) *NavigateParams
WithTransitionType intended transition type.
type NavigateToHistoryEntryParams ¶
type NavigateToHistoryEntryParams struct {
}NavigateToHistoryEntryParams navigates current page to the given history entry.
func NavigateToHistoryEntry ¶
func NavigateToHistoryEntry(entryID int64) *NavigateToHistoryEntryParams
NavigateToHistoryEntry navigates current page to the given history entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigateToHistoryEntry
parameters:
entryID - Unique id of the entry to navigate to.
type NavigatedWithinDocumentNavigationType ¶
type NavigatedWithinDocumentNavigationType string
NavigatedWithinDocumentNavigationType navigation type.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-navigatedWithinDocument
const ()
NavigatedWithinDocumentNavigationType values.
func (NavigatedWithinDocumentNavigationType) String ¶
func (t NavigatedWithinDocumentNavigationType) String() string
String returns the NavigatedWithinDocumentNavigationType as string value.
func (*NavigatedWithinDocumentNavigationType) UnmarshalJSON ¶
func (t *NavigatedWithinDocumentNavigationType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type NavigationEntry ¶
type NavigationEntry struct {}
NavigationEntry navigation history entry.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-NavigationEntry
type NavigationType ¶
type NavigationType string
NavigationType the type of a frameNavigated event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-NavigationType
const ()
NavigationType values.
func (NavigationType) String ¶
func (t NavigationType) String() string
String returns the NavigationType as string value.
func (*NavigationType) UnmarshalJSON ¶
func (t *NavigationType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type PermissionsPolicyBlockLocator ¶
type PermissionsPolicyBlockLocator struct { FrameID cdp.FrameID `json:"frameId"` BlockReason PermissionsPolicyBlockReason `json:"blockReason"` }
PermissionsPolicyBlockLocator [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyBlockLocator
type PermissionsPolicyBlockReason ¶
type PermissionsPolicyBlockReason string
PermissionsPolicyBlockReason reason for a permissions policy feature to be disabled.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyBlockReason
const ( PermissionsPolicyBlockReasonHeader PermissionsPolicyBlockReason = "Header" PermissionsPolicyBlockReasonIframeAttribute PermissionsPolicyBlockReason = "IframeAttribute" PermissionsPolicyBlockReasonInFencedFrameTree PermissionsPolicyBlockReason = "InFencedFrameTree" PermissionsPolicyBlockReasonInIsolatedApp PermissionsPolicyBlockReason = "InIsolatedApp" )
PermissionsPolicyBlockReason values.
func (PermissionsPolicyBlockReason) String ¶
func (t PermissionsPolicyBlockReason) String() string
String returns the PermissionsPolicyBlockReason as string value.
func (*PermissionsPolicyBlockReason) UnmarshalJSON ¶
func (t *PermissionsPolicyBlockReason) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type PermissionsPolicyFeature ¶
type PermissionsPolicyFeature string
PermissionsPolicyFeature all Permissions Policy features. This enum should match the one defined in services/network/public/cpp/permissions_policy/permissions_policy_features.json5.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyFeature
const ( PermissionsPolicyFeatureAccelerometer PermissionsPolicyFeature = "accelerometer" PermissionsPolicyFeatureAllScreensCapture PermissionsPolicyFeature = "all-screens-capture" PermissionsPolicyFeatureAmbientLightSensor PermissionsPolicyFeature = "ambient-light-sensor" PermissionsPolicyFeatureAttributionReporting PermissionsPolicyFeature = "attribution-reporting" PermissionsPolicyFeatureAutoplay PermissionsPolicyFeature = "autoplay" PermissionsPolicyFeatureBluetooth PermissionsPolicyFeature = "bluetooth" PermissionsPolicyFeatureBrowsingTopics PermissionsPolicyFeature = "browsing-topics" PermissionsPolicyFeatureCamera PermissionsPolicyFeature = "camera" PermissionsPolicyFeatureCapturedSurfaceControl PermissionsPolicyFeature = "captured-surface-control" PermissionsPolicyFeatureChDpr PermissionsPolicyFeature = "ch-dpr" PermissionsPolicyFeatureChDeviceMemory PermissionsPolicyFeature = "ch-device-memory" PermissionsPolicyFeatureChDownlink PermissionsPolicyFeature = "ch-downlink" PermissionsPolicyFeatureChEct PermissionsPolicyFeature = "ch-ect" PermissionsPolicyFeatureChPrefersColorScheme PermissionsPolicyFeature = "ch-prefers-color-scheme" PermissionsPolicyFeatureChPrefersReducedMotion PermissionsPolicyFeature = "ch-prefers-reduced-motion" PermissionsPolicyFeatureChPrefersReducedTransparency PermissionsPolicyFeature = "ch-prefers-reduced-transparency" PermissionsPolicyFeatureChRtt PermissionsPolicyFeature = "ch-rtt" PermissionsPolicyFeatureChSaveData PermissionsPolicyFeature = "ch-save-data" PermissionsPolicyFeatureChUa PermissionsPolicyFeature = "ch-ua" PermissionsPolicyFeatureChUaArch PermissionsPolicyFeature = "ch-ua-arch" PermissionsPolicyFeatureChUaBitness PermissionsPolicyFeature = "ch-ua-bitness" PermissionsPolicyFeatureChUaHighEntropyValues PermissionsPolicyFeature = "ch-ua-high-entropy-values" PermissionsPolicyFeatureChUaPlatform PermissionsPolicyFeature = "ch-ua-platform" PermissionsPolicyFeatureChUaModel PermissionsPolicyFeature = "ch-ua-model" PermissionsPolicyFeatureChUaMobile PermissionsPolicyFeature = "ch-ua-mobile" PermissionsPolicyFeatureChUaFormFactors PermissionsPolicyFeature = "ch-ua-form-factors" PermissionsPolicyFeatureChUaFullVersion PermissionsPolicyFeature = "ch-ua-full-version" PermissionsPolicyFeatureChUaFullVersionList PermissionsPolicyFeature = "ch-ua-full-version-list" PermissionsPolicyFeatureChUaPlatformVersion PermissionsPolicyFeature = "ch-ua-platform-version" PermissionsPolicyFeatureChUaWow64 PermissionsPolicyFeature = "ch-ua-wow64" PermissionsPolicyFeatureChViewportHeight PermissionsPolicyFeature = "ch-viewport-height" PermissionsPolicyFeatureChViewportWidth PermissionsPolicyFeature = "ch-viewport-width" PermissionsPolicyFeatureChWidth PermissionsPolicyFeature = "ch-width" PermissionsPolicyFeatureClipboardRead PermissionsPolicyFeature = "clipboard-read" PermissionsPolicyFeatureClipboardWrite PermissionsPolicyFeature = "clipboard-write" PermissionsPolicyFeatureComputePressure PermissionsPolicyFeature = "compute-pressure" PermissionsPolicyFeatureControlledFrame PermissionsPolicyFeature = "controlled-frame" PermissionsPolicyFeatureCrossOriginIsolated PermissionsPolicyFeature = "cross-origin-isolated" PermissionsPolicyFeatureDeferredFetch PermissionsPolicyFeature = "deferred-fetch" PermissionsPolicyFeatureDeferredFetchMinimal PermissionsPolicyFeature = "deferred-fetch-minimal" PermissionsPolicyFeatureDigitalCredentialsGet PermissionsPolicyFeature = "digital-credentials-get" PermissionsPolicyFeatureDirectSockets PermissionsPolicyFeature = "direct-sockets" PermissionsPolicyFeatureDirectSocketsPrivate PermissionsPolicyFeature = "direct-sockets-private" PermissionsPolicyFeatureDisplayCapture PermissionsPolicyFeature = "display-capture" PermissionsPolicyFeatureDocumentDomain PermissionsPolicyFeature = "document-domain" PermissionsPolicyFeatureEncryptedMedia PermissionsPolicyFeature = "encrypted-media" PermissionsPolicyFeatureExecutionWhileOutOfViewport PermissionsPolicyFeature = "execution-while-out-of-viewport" PermissionsPolicyFeatureExecutionWhileNotRendered PermissionsPolicyFeature = "execution-while-not-rendered" PermissionsPolicyFeatureFencedUnpartitionedStorageRead PermissionsPolicyFeature = "fenced-unpartitioned-storage-read" PermissionsPolicyFeatureFocusWithoutUserActivation PermissionsPolicyFeature = "focus-without-user-activation" PermissionsPolicyFeatureFullscreen PermissionsPolicyFeature = "fullscreen" PermissionsPolicyFeatureFrobulate PermissionsPolicyFeature = "frobulate" PermissionsPolicyFeatureGamepad PermissionsPolicyFeature = "gamepad" PermissionsPolicyFeatureGeolocation PermissionsPolicyFeature = "geolocation" PermissionsPolicyFeatureGyroscope PermissionsPolicyFeature = "gyroscope" PermissionsPolicyFeatureHid PermissionsPolicyFeature = "hid" PermissionsPolicyFeatureIdentityCredentialsGet PermissionsPolicyFeature = "identity-credentials-get" PermissionsPolicyFeatureIdleDetection PermissionsPolicyFeature = "idle-detection" PermissionsPolicyFeatureInterestCohort PermissionsPolicyFeature = "interest-cohort" PermissionsPolicyFeatureJoinAdInterestGroup PermissionsPolicyFeature = "join-ad-interest-group" PermissionsPolicyFeatureKeyboardMap PermissionsPolicyFeature = "keyboard-map" PermissionsPolicyFeatureLocalFonts PermissionsPolicyFeature = "local-fonts" PermissionsPolicyFeatureMagnetometer PermissionsPolicyFeature = "magnetometer" PermissionsPolicyFeatureMediaPlaybackWhileNotVisible PermissionsPolicyFeature = "media-playback-while-not-visible" PermissionsPolicyFeatureMicrophone PermissionsPolicyFeature = "microphone" PermissionsPolicyFeatureMidi PermissionsPolicyFeature = "midi" PermissionsPolicyFeatureOtpCredentials PermissionsPolicyFeature = "otp-credentials" PermissionsPolicyFeaturePayment PermissionsPolicyFeature = "payment" PermissionsPolicyFeaturePictureInPicture PermissionsPolicyFeature = "picture-in-picture" PermissionsPolicyFeaturePopins PermissionsPolicyFeature = "popins" PermissionsPolicyFeaturePrivateAggregation PermissionsPolicyFeature = "private-aggregation" PermissionsPolicyFeaturePrivateStateTokenIssuance PermissionsPolicyFeature = "private-state-token-issuance" PermissionsPolicyFeaturePrivateStateTokenRedemption PermissionsPolicyFeature = "private-state-token-redemption" PermissionsPolicyFeaturePublickeyCredentialsCreate PermissionsPolicyFeature = "publickey-credentials-create" PermissionsPolicyFeaturePublickeyCredentialsGet PermissionsPolicyFeature = "publickey-credentials-get" PermissionsPolicyFeatureRunAdAuction PermissionsPolicyFeature = "run-ad-auction" PermissionsPolicyFeatureScreenWakeLock PermissionsPolicyFeature = "screen-wake-lock" PermissionsPolicyFeatureSerial PermissionsPolicyFeature = "serial" PermissionsPolicyFeatureSmartCard PermissionsPolicyFeature = "smart-card" PermissionsPolicyFeatureSpeakerSelection PermissionsPolicyFeature = "speaker-selection" PermissionsPolicyFeatureStorageAccess PermissionsPolicyFeature = "storage-access" PermissionsPolicyFeatureSubApps PermissionsPolicyFeature = "sub-apps" PermissionsPolicyFeatureSyncXhr PermissionsPolicyFeature = "sync-xhr" PermissionsPolicyFeatureUnload PermissionsPolicyFeature = "unload" PermissionsPolicyFeatureUsb PermissionsPolicyFeature = "usb" PermissionsPolicyFeatureUsbUnrestricted PermissionsPolicyFeature = "usb-unrestricted" PermissionsPolicyFeatureVerticalScroll PermissionsPolicyFeature = "vertical-scroll" PermissionsPolicyFeatureWebAppInstallation PermissionsPolicyFeature = "web-app-installation" PermissionsPolicyFeatureWebPrinting PermissionsPolicyFeature = "web-printing" PermissionsPolicyFeatureWindowManagement PermissionsPolicyFeature = "window-management" PermissionsPolicyFeatureXrSpatialTracking PermissionsPolicyFeature = "xr-spatial-tracking" )
PermissionsPolicyFeature values.
func (PermissionsPolicyFeature) String ¶
func (t PermissionsPolicyFeature) String() string
String returns the PermissionsPolicyFeature as string value.
func (*PermissionsPolicyFeature) UnmarshalJSON ¶
func (t *PermissionsPolicyFeature) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type PermissionsPolicyFeatureState ¶
type PermissionsPolicyFeatureState struct { Feature PermissionsPolicyFeature `json:"feature"` Allowed bool `json:"allowed"` Locator *PermissionsPolicyBlockLocator `json:"locator,omitempty,omitzero"` }
PermissionsPolicyFeatureState [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-PermissionsPolicyFeatureState
type PrintToPDFParams ¶
type PrintToPDFParams struct { Landscape bool `json:"landscape,omitempty,omitzero"` // Paper orientation. Defaults to false. PrintBackground bool `json:"printBackground,omitempty,omitzero"` // Print background graphics. Defaults to false. Scale float64 `json:"scale,omitempty,omitzero"` // Scale of the webpage rendering. Defaults to 1. PaperWidth float64 `json:"paperWidth,omitempty,omitzero"` // Paper width in inches. Defaults to 8.5 inches. PaperHeight float64 `json:"paperHeight,omitempty,omitzero"` // Paper height in inches. Defaults to 11 inches. MarginTop float64 `json:"marginTop"` // Top margin in inches. Defaults to 1cm (~0.4 inches). MarginBottom float64 `json:"marginBottom"` // Bottom margin in inches. Defaults to 1cm (~0.4 inches). MarginLeft float64 `json:"marginLeft"` // Left margin in inches. Defaults to 1cm (~0.4 inches). MarginRight float64 `json:"marginRight"` // Right margin in inches. Defaults to 1cm (~0.4 inches). PageRanges string `json:"pageRanges,omitempty,omitzero"` // Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end. HeaderTemplate string `json:"headerTemplate,omitempty,omitzero"` // HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - date: formatted print date - title: document title - url: document location - pageNumber: current page number - totalPages: total pages in the document For example, <span class=title></span> would generate span containing the title. PreferCSSPageSize bool `json:"preferCSSPageSize,omitempty,omitzero"` // Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. TransferMode PrintToPDFTransferMode `json:"transferMode,omitempty,omitzero"` // return as stream GenerateTaggedPDF bool `json:"generateTaggedPDF,omitempty,omitzero"` // Whether or not to generate tagged (accessible) PDF. Defaults to embedder choice. GenerateDocumentOutline bool `json:"generateDocumentOutline,omitempty,omitzero"` // Whether or not to embed the document outline into the PDF. }
PrintToPDFParams print page as PDF.
func PrintToPDF ¶
func PrintToPDF() *PrintToPDFParams
PrintToPDF print page as PDF.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-printToPDF
parameters:
func (*PrintToPDFParams) Do ¶
func (p *PrintToPDFParams) Do(ctx context.Context) (data []byte, stream io.StreamHandle, err error)
Do executes Page.printToPDF against the provided context.
returns:
data - Base64-encoded pdf data. Empty if |returnAsStream| is specified. stream - A handle of the stream that holds resulting PDF data.
func (PrintToPDFParams) WithDisplayHeaderFooter ¶
func (p PrintToPDFParams) WithDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFParams
WithDisplayHeaderFooter display header and footer. Defaults to false.
func (PrintToPDFParams) WithFooterTemplate ¶
func (p PrintToPDFParams) WithFooterTemplate(footerTemplate string) *PrintToPDFParams
WithFooterTemplate HTML template for the print footer. Should use the same format as the headerTemplate.
func (PrintToPDFParams) WithGenerateDocumentOutline ¶
func (p PrintToPDFParams) WithGenerateDocumentOutline(generateDocumentOutline bool) *PrintToPDFParams
WithGenerateDocumentOutline whether or not to embed the document outline into the PDF.
func (PrintToPDFParams) WithGenerateTaggedPDF ¶
func (p PrintToPDFParams) WithGenerateTaggedPDF(generateTaggedPDF bool) *PrintToPDFParams
WithGenerateTaggedPDF whether or not to generate tagged (accessible) PDF. Defaults to embedder choice.
func (PrintToPDFParams) WithHeaderTemplate ¶
func (p PrintToPDFParams) WithHeaderTemplate(headerTemplate string) *PrintToPDFParams
WithHeaderTemplate HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - date: formatted print date - title: document title - url: document location - pageNumber: current page number - totalPages: total pages in the document For example, <span class=title></span> would generate span containing the title.
func (PrintToPDFParams) WithLandscape ¶
func (p PrintToPDFParams) WithLandscape(landscape bool) *PrintToPDFParams
WithLandscape paper orientation. Defaults to false.
func (PrintToPDFParams) WithMarginBottom ¶
func (p PrintToPDFParams) WithMarginBottom(marginBottom float64) *PrintToPDFParams
WithMarginBottom bottom margin in inches. Defaults to 1cm (~0.4 inches).
func (PrintToPDFParams) WithMarginLeft ¶
func (p PrintToPDFParams) WithMarginLeft(marginLeft float64) *PrintToPDFParams
WithMarginLeft left margin in inches. Defaults to 1cm (~0.4 inches).
func (PrintToPDFParams) WithMarginRight ¶
func (p PrintToPDFParams) WithMarginRight(marginRight float64) *PrintToPDFParams
WithMarginRight right margin in inches. Defaults to 1cm (~0.4 inches).
func (PrintToPDFParams) WithMarginTop ¶
func (p PrintToPDFParams) WithMarginTop(marginTop float64) *PrintToPDFParams
WithMarginTop top margin in inches. Defaults to 1cm (~0.4 inches).
func (PrintToPDFParams) WithPageRanges ¶
func (p PrintToPDFParams) WithPageRanges(pageRanges string) *PrintToPDFParams
WithPageRanges paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
func (PrintToPDFParams) WithPaperHeight ¶
func (p PrintToPDFParams) WithPaperHeight(paperHeight float64) *PrintToPDFParams
WithPaperHeight paper height in inches. Defaults to 11 inches.
func (PrintToPDFParams) WithPaperWidth ¶
func (p PrintToPDFParams) WithPaperWidth(paperWidth float64) *PrintToPDFParams
WithPaperWidth paper width in inches. Defaults to 8.5 inches.
func (PrintToPDFParams) WithPreferCSSPageSize ¶
func (p PrintToPDFParams) WithPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFParams
WithPreferCSSPageSize whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
func (PrintToPDFParams) WithPrintBackground ¶
func (p PrintToPDFParams) WithPrintBackground(printBackground bool) *PrintToPDFParams
WithPrintBackground print background graphics. Defaults to false.
func (PrintToPDFParams) WithScale ¶
func (p PrintToPDFParams) WithScale(scale float64) *PrintToPDFParams
WithScale scale of the webpage rendering. Defaults to 1.
func (PrintToPDFParams) WithTransferMode ¶
func (p PrintToPDFParams) WithTransferMode(transferMode PrintToPDFTransferMode) *PrintToPDFParams
WithTransferMode return as stream.
type PrintToPDFReturns ¶
type PrintToPDFReturns struct { Data string `json:"data,omitempty,omitzero"` // Base64-encoded pdf data. Empty if |returnAsStream| is specified. Stream io.StreamHandle `json:"stream,omitempty,omitzero"` // A handle of the stream that holds resulting PDF data. }
PrintToPDFReturns return values.
type PrintToPDFTransferMode ¶
type PrintToPDFTransferMode string
PrintToPDFTransferMode return as stream.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-printToPDF
const ( PrintToPDFTransferModeReturnAsBase64 PrintToPDFTransferMode = "ReturnAsBase64" PrintToPDFTransferModeReturnAsStream PrintToPDFTransferMode = "ReturnAsStream" )
PrintToPDFTransferMode values.
func (PrintToPDFTransferMode) String ¶
func (t PrintToPDFTransferMode) String() string
String returns the PrintToPDFTransferMode as string value.
func (*PrintToPDFTransferMode) UnmarshalJSON ¶
func (t *PrintToPDFTransferMode) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type ProduceCompilationCacheParams ¶
type ProduceCompilationCacheParams struct {
Scripts []*CompilationCacheParams `json:"scripts"`
}
ProduceCompilationCacheParams requests backend to produce compilation cache for the specified scripts. scripts are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: Page.compilationCacheProduced.
func ProduceCompilationCache ¶
func ProduceCompilationCache(scripts []*CompilationCacheParams) *ProduceCompilationCacheParams
ProduceCompilationCache requests backend to produce compilation cache for the specified scripts. scripts are appended to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: Page.compilationCacheProduced.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-produceCompilationCache
parameters:
scripts
type ProtocolHandler ¶
ProtocolHandler [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ProtocolHandler
type ReferrerPolicy ¶
type ReferrerPolicy string
ReferrerPolicy the referring-policy used for the navigation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ReferrerPolicy
const ( ReferrerPolicyNoReferrer ReferrerPolicy = "noReferrer" ReferrerPolicyNoReferrerWhenDowngrade ReferrerPolicy = "noReferrerWhenDowngrade" ReferrerPolicyOrigin ReferrerPolicy = "origin" ReferrerPolicyOriginWhenCrossOrigin ReferrerPolicy = "originWhenCrossOrigin" ReferrerPolicySameOrigin ReferrerPolicy = "sameOrigin" ReferrerPolicyStrictOrigin ReferrerPolicy = "strictOrigin" ReferrerPolicyStrictOriginWhenCrossOrigin ReferrerPolicy = "strictOriginWhenCrossOrigin" ReferrerPolicyUnsafeURL ReferrerPolicy = "unsafeUrl" )
ReferrerPolicy values.
func (ReferrerPolicy) String ¶
func (t ReferrerPolicy) String() string
String returns the ReferrerPolicy as string value.
func (*ReferrerPolicy) UnmarshalJSON ¶
func (t *ReferrerPolicy) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type RelatedApplication ¶
RelatedApplication [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-RelatedApplication
type ReloadParams ¶
type ReloadParams struct { IgnoreCache bool `json:"ignoreCache,omitempty,omitzero"` // If true, browser cache is ignored (as if the user pressed Shift+refresh). ScriptToEvaluateOnLoad string `json:"scriptToEvaluateOnLoad,omitempty,omitzero"` // If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin. LoaderID cdp.LoaderID `json:"loaderId,omitempty,omitzero"` // If set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation. }
ReloadParams reloads given page optionally ignoring the cache.
func Reload ¶
func Reload() *ReloadParams
Reload reloads given page optionally ignoring the cache.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-reload
parameters:
func (*ReloadParams) Do ¶
func (p *ReloadParams) Do(ctx context.Context) (err error)
Do executes Page.reload against the provided context.
func (ReloadParams) WithIgnoreCache ¶
func (p ReloadParams) WithIgnoreCache(ignoreCache bool) *ReloadParams
WithIgnoreCache if true, browser cache is ignored (as if the user pressed Shift+refresh).
func (ReloadParams) WithLoaderID ¶
func (p ReloadParams) WithLoaderID(loaderID cdp.LoaderID) *ReloadParams
WithLoaderID if set, an error will be thrown if the target page's main frame's loader id does not match the provided id. This prevents accidentally reloading an unintended target in case there's a racing navigation.
func (ReloadParams) WithScriptToEvaluateOnLoad ¶
func (p ReloadParams) WithScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) *ReloadParams
WithScriptToEvaluateOnLoad if set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
type RemoveScriptToEvaluateOnNewDocumentParams ¶
type RemoveScriptToEvaluateOnNewDocumentParams struct {
Identifier ScriptIdentifier `json:"identifier"`
}
RemoveScriptToEvaluateOnNewDocumentParams removes given script from the list.
func RemoveScriptToEvaluateOnNewDocument ¶
func RemoveScriptToEvaluateOnNewDocument(identifier ScriptIdentifier) *RemoveScriptToEvaluateOnNewDocumentParams
RemoveScriptToEvaluateOnNewDocument removes given script from the list.
parameters:
identifier
type ResetNavigationHistoryParams ¶
type ResetNavigationHistoryParams struct{}
ResetNavigationHistoryParams resets navigation history for the current page.
func ResetNavigationHistory ¶
func ResetNavigationHistory() *ResetNavigationHistoryParams
ResetNavigationHistory resets navigation history for the current page.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-resetNavigationHistory
type ScopeExtension ¶
type ScopeExtension struct { Origin string `json:"origin"` // Instead of using tuple, this field always returns the serialized string for easy understanding and comparison. HasOriginWildcard bool `json:"hasOriginWildcard"` }
ScopeExtension [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScopeExtension
type ScreencastFormat ¶
type ScreencastFormat string
ScreencastFormat image compression format.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-startScreencast
const ( ScreencastFormatJpeg ScreencastFormat = "jpeg" ScreencastFormatPng ScreencastFormat = "png" )
ScreencastFormat values.
func (ScreencastFormat) String ¶
func (t ScreencastFormat) String() string
String returns the ScreencastFormat as string value.
func (*ScreencastFormat) UnmarshalJSON ¶
func (t *ScreencastFormat) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type ScreencastFrameAckParams ¶
type ScreencastFrameAckParams struct {
SessionID int64 `json:"sessionId"` // Frame number.
}
ScreencastFrameAckParams acknowledges that a screencast frame has been received by the frontend.
func ScreencastFrameAck ¶
func ScreencastFrameAck(sessionID int64) *ScreencastFrameAckParams
ScreencastFrameAck acknowledges that a screencast frame has been received by the frontend.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-screencastFrameAck
parameters:
sessionID - Frame number.
type ScreencastFrameMetadata ¶
type ScreencastFrameMetadata struct { OffsetTop float64 `json:"offsetTop"` // Top offset in DIP. PageScaleFactor float64 `json:"pageScaleFactor"` // Page scale factor. DeviceWidth float64 `json:"deviceWidth"` // Device screen width in DIP. DeviceHeight float64 `json:"deviceHeight"` // Device screen height in DIP. ScrollOffsetX float64 `json:"scrollOffsetX"` // Position of horizontal scroll in CSS pixels. ScrollOffsetY float64 `json:"scrollOffsetY"` // Position of vertical scroll in CSS pixels. Timestamp *cdp.TimeSinceEpoch `json:"timestamp,omitempty,omitzero"` // Frame swap timestamp. }
ScreencastFrameMetadata screencast frame metadata.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScreencastFrameMetadata
type Screenshot ¶
type Screenshot struct { Image *ImageResource `json:"image"` FormFactor string `json:"formFactor"` Label string `json:"label,omitempty,omitzero"` }
Screenshot [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Screenshot
type ScriptFontFamilies ¶
type ScriptFontFamilies struct { Script string `json:"script"` // Name of the script which these font families are defined for. FontFamilies *FontFamilies `json:"fontFamilies"` // Generic font families collection for the script. }
ScriptFontFamilies font families collection for a script.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScriptFontFamilies
type ScriptIdentifier ¶
type ScriptIdentifier string
ScriptIdentifier unique script identifier.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ScriptIdentifier
func (ScriptIdentifier) String ¶
func (t ScriptIdentifier) String() string
String returns the ScriptIdentifier as string value.
type SearchInResourceParams ¶
type SearchInResourceParams struct { FrameID cdp.FrameID `json:"frameId"` // Frame id for resource to search in. URL string `json:"url"` // URL of the resource to search in. Query string `json:"query"` // String to search for. CaseSensitive bool `json:"caseSensitive,omitempty,omitzero"` // If true, search is case sensitive. IsRegex bool `json:"isRegex,omitempty,omitzero"` // If true, treats string parameter as regex. }
SearchInResourceParams searches for given string in resource content.
func SearchInResource ¶
func SearchInResource(frameID cdp.FrameID, url string, query string) *SearchInResourceParams
SearchInResource searches for given string in resource content.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-searchInResource
parameters:
frameID - Frame id for resource to search in. url - URL of the resource to search in. query - String to search for.
func (*SearchInResourceParams) Do ¶
func (p *SearchInResourceParams) Do(ctx context.Context) (result []*debugger.SearchMatch, err error)
Do executes Page.searchInResource against the provided context.
returns:
result - List of search matches.
func (SearchInResourceParams) WithCaseSensitive ¶
func (p SearchInResourceParams) WithCaseSensitive(caseSensitive bool) *SearchInResourceParams
WithCaseSensitive if true, search is case sensitive.
func (SearchInResourceParams) WithIsRegex ¶
func (p SearchInResourceParams) WithIsRegex(isRegex bool) *SearchInResourceParams
WithIsRegex if true, treats string parameter as regex.
type SearchInResourceReturns ¶
type SearchInResourceReturns struct {
Result []*debugger.SearchMatch `json:"result,omitempty,omitzero"` // List of search matches.
}
SearchInResourceReturns return values.
type SetAdBlockingEnabledParams ¶
type SetAdBlockingEnabledParams struct {
Enabled bool `json:"enabled"` // Whether to block ads.
}
SetAdBlockingEnabledParams enable Chrome's experimental ad filter on all sites.
func SetAdBlockingEnabled ¶
func SetAdBlockingEnabled(enabled bool) *SetAdBlockingEnabledParams
SetAdBlockingEnabled enable Chrome's experimental ad filter on all sites.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setAdBlockingEnabled
parameters:
enabled - Whether to block ads.
type SetBypassCSPParams ¶
type SetBypassCSPParams struct {
Enabled bool `json:"enabled"` // Whether to bypass page CSP.
}
SetBypassCSPParams enable page Content Security Policy by-passing.
func SetBypassCSP ¶
func SetBypassCSP(enabled bool) *SetBypassCSPParams
SetBypassCSP enable page Content Security Policy by-passing.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setBypassCSP
parameters:
enabled - Whether to bypass page CSP.
type SetDocumentContentParams ¶
type SetDocumentContentParams struct { FrameID cdp.FrameID `json:"frameId"` // Frame id to set HTML for. HTML string `json:"html"` // HTML content to set. }
SetDocumentContentParams sets given markup as the document's HTML.
func SetDocumentContent ¶
func SetDocumentContent(frameID cdp.FrameID, html string) *SetDocumentContentParams
SetDocumentContent sets given markup as the document's HTML.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDocumentContent
parameters:
frameID - Frame id to set HTML for. html - HTML content to set.
type SetFontFamiliesParams ¶
type SetFontFamiliesParams struct { FontFamilies *FontFamilies `json:"fontFamilies"` // Specifies font families to set. If a font family is not specified, it won't be changed. ForScripts []*ScriptFontFamilies `json:"forScripts,omitempty,omitzero"` // Specifies font families to set for individual scripts. }
SetFontFamiliesParams set generic font families.
func SetFontFamilies ¶
func SetFontFamilies(fontFamilies *FontFamilies) *SetFontFamiliesParams
SetFontFamilies set generic font families.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontFamilies
parameters:
fontFamilies - Specifies font families to set. If a font family is not specified, it won't be changed.
func (*SetFontFamiliesParams) Do ¶
func (p *SetFontFamiliesParams) Do(ctx context.Context) (err error)
Do executes Page.setFontFamilies against the provided context.
func (SetFontFamiliesParams) WithForScripts ¶
func (p SetFontFamiliesParams) WithForScripts(forScripts []*ScriptFontFamilies) *SetFontFamiliesParams
WithForScripts specifies font families to set for individual scripts.
type SetFontSizesParams ¶
type SetFontSizesParams struct {
FontSizes *FontSizes `json:"fontSizes"` // Specifies font sizes to set. If a font size is not specified, it won't be changed.
}
SetFontSizesParams set default font sizes.
func SetFontSizes ¶
func SetFontSizes(fontSizes *FontSizes) *SetFontSizesParams
SetFontSizes set default font sizes.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontSizes
parameters:
fontSizes - Specifies font sizes to set. If a font size is not specified, it won't be changed.
type SetInterceptFileChooserDialogParams ¶
type SetInterceptFileChooserDialogParams struct {
Enabled bool `json:"enabled"`
}
SetInterceptFileChooserDialogParams intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event Page.fileChooserOpened is emitted.
func SetInterceptFileChooserDialog ¶
func SetInterceptFileChooserDialog(enabled bool) *SetInterceptFileChooserDialogParams
SetInterceptFileChooserDialog intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event Page.fileChooserOpened is emitted.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setInterceptFileChooserDialog
parameters:
enabled
type SetLifecycleEventsEnabledParams ¶
type SetLifecycleEventsEnabledParams struct {
Enabled bool `json:"enabled"` // If true, starts emitting lifecycle events.
}
SetLifecycleEventsEnabledParams controls whether page will emit lifecycle events.
func SetLifecycleEventsEnabled ¶
func SetLifecycleEventsEnabled(enabled bool) *SetLifecycleEventsEnabledParams
SetLifecycleEventsEnabled controls whether page will emit lifecycle events.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setLifecycleEventsEnabled
parameters:
enabled - If true, starts emitting lifecycle events.
type SetPrerenderingAllowedParams ¶
type SetPrerenderingAllowedParams struct {
IsAllowed bool `json:"isAllowed"`
}
SetPrerenderingAllowedParams enable/disable prerendering manually. This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
func SetPrerenderingAllowed ¶
func SetPrerenderingAllowed(isAllowed bool) *SetPrerenderingAllowedParams
SetPrerenderingAllowed enable/disable prerendering manually. This command is a short-term solution for https://crbug.com/1440085. See https://docs.google.com/document/d/12HVmFxYj5Jc-eJr5OmWsa2bqTJsbgGLKI6ZIyx0_wpA for more details. TODO(https://crbug.com/1440085): Remove this once Puppeteer supports tab targets.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setPrerenderingAllowed
parameters:
isAllowed
type SetRPHRegistrationModeParams ¶
type SetRPHRegistrationModeParams struct {
Mode AutoResponseMode `json:"mode"`
}
SetRPHRegistrationModeParams extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation.
func SetRPHRegistrationMode ¶
func SetRPHRegistrationMode(mode AutoResponseMode) *SetRPHRegistrationModeParams
SetRPHRegistrationMode extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setRPHRegistrationMode
parameters:
mode
type SetSPCTransactionModeParams ¶
type SetSPCTransactionModeParams struct {
Mode AutoResponseMode `json:"mode"`
}
SetSPCTransactionModeParams sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode.
func SetSPCTransactionMode ¶
func SetSPCTransactionMode(mode AutoResponseMode) *SetSPCTransactionModeParams
SetSPCTransactionMode sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setSPCTransactionMode
parameters:
mode
type SetWebLifecycleStateParams ¶
type SetWebLifecycleStateParams struct {
State SetWebLifecycleStateState `json:"state"` // Target lifecycle state
}
SetWebLifecycleStateParams tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/.
func SetWebLifecycleState ¶
func SetWebLifecycleState(state SetWebLifecycleStateState) *SetWebLifecycleStateParams
SetWebLifecycleState tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
parameters:
state - Target lifecycle state
type SetWebLifecycleStateState ¶
type SetWebLifecycleStateState string
SetWebLifecycleStateState target lifecycle state.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
const ( SetWebLifecycleStateStateFrozen SetWebLifecycleStateState = "frozen" SetWebLifecycleStateStateActive SetWebLifecycleStateState = "active" )
SetWebLifecycleStateState values.
func (SetWebLifecycleStateState) String ¶
func (t SetWebLifecycleStateState) String() string
String returns the SetWebLifecycleStateState as string value.
func (*SetWebLifecycleStateState) UnmarshalJSON ¶
func (t *SetWebLifecycleStateState) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type ShareTarget ¶
type ShareTarget struct {}
ShareTarget [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-ShareTarget
type Shortcut ¶
Shortcut [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Shortcut
type StartScreencastParams ¶
type StartScreencastParams struct { Format ScreencastFormat `json:"format,omitempty,omitzero"` // Image compression format. Quality int64 `json:"quality,omitempty,omitzero"` // Compression quality from range [0..100]. MaxWidth int64 `json:"maxWidth,omitempty,omitzero"` // Maximum screenshot width. MaxHeight int64 `json:"maxHeight,omitempty,omitzero"` // Maximum screenshot height. EveryNthFrame int64 `json:"everyNthFrame,omitempty,omitzero"` // Send every n-th frame. }
StartScreencastParams starts sending each frame using the screencastFrame event.
func StartScreencast ¶
func StartScreencast() *StartScreencastParams
StartScreencast starts sending each frame using the screencastFrame event.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-startScreencast
parameters:
func (*StartScreencastParams) Do ¶
func (p *StartScreencastParams) Do(ctx context.Context) (err error)
Do executes Page.startScreencast against the provided context.
func (StartScreencastParams) WithEveryNthFrame ¶
func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScreencastParams
WithEveryNthFrame send every n-th frame.
func (StartScreencastParams) WithFormat ¶
func (p StartScreencastParams) WithFormat(format ScreencastFormat) *StartScreencastParams
WithFormat image compression format.
func (StartScreencastParams) WithMaxHeight ¶
func (p StartScreencastParams) WithMaxHeight(maxHeight int64) *StartScreencastParams
WithMaxHeight maximum screenshot height.
func (StartScreencastParams) WithMaxWidth ¶
func (p StartScreencastParams) WithMaxWidth(maxWidth int64) *StartScreencastParams
WithMaxWidth maximum screenshot width.
func (StartScreencastParams) WithQuality ¶
func (p StartScreencastParams) WithQuality(quality int64) *StartScreencastParams
WithQuality compression quality from range [0..100].
type StopLoadingParams ¶
type StopLoadingParams struct{}
StopLoadingParams force the page stop all navigations and pending resource fetches.
func StopLoading ¶
func StopLoading() *StopLoadingParams
StopLoading force the page stop all navigations and pending resource fetches.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopLoading
type StopScreencastParams ¶
type StopScreencastParams struct{}
StopScreencastParams stops sending each frame in the screencastFrame.
func StopScreencast ¶
func StopScreencast() *StopScreencastParams
StopScreencast stops sending each frame in the screencastFrame.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-stopScreencast
type TransitionType ¶
type TransitionType string
TransitionType transition type.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-TransitionType
const ( TransitionTypeLink TransitionType = "link" TransitionTypeTyped TransitionType = "typed" TransitionTypeAddressBar TransitionType = "address_bar" TransitionTypeAutoBookmark TransitionType = "auto_bookmark" TransitionTypeAutoSubframe TransitionType = "auto_subframe" TransitionTypeManualSubframe TransitionType = "manual_subframe" TransitionTypeGenerated TransitionType = "generated" TransitionTypeAutoToplevel TransitionType = "auto_toplevel" TransitionTypeFormSubmit TransitionType = "form_submit" TransitionTypeReload TransitionType = "reload" TransitionTypeKeyword TransitionType = "keyword" TransitionTypeKeywordGenerated TransitionType = "keyword_generated" TransitionTypeOther TransitionType = "other" )
TransitionType values.
func (TransitionType) String ¶
func (t TransitionType) String() string
String returns the TransitionType as string value.
func (*TransitionType) UnmarshalJSON ¶
func (t *TransitionType) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies [json.Unmarshaler].
type Viewport ¶
type Viewport struct { X float64 `json:"x"` // X offset in device independent pixels (dip). Y float64 `json:"y"` // Y offset in device independent pixels (dip). Width float64 `json:"width"` // Rectangle width in device independent pixels (dip). Height float64 `json:"height"` // Rectangle height in device independent pixels (dip). Scale float64 `json:"scale"` // Page scale factor. }
Viewport viewport for capturing screenshot.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Viewport
type VisualViewport ¶
type VisualViewport struct { OffsetX float64 `json:"offsetX"` // Horizontal offset relative to the layout viewport (CSS pixels). OffsetY float64 `json:"offsetY"` // Vertical offset relative to the layout viewport (CSS pixels). PageX float64 `json:"pageX"` // Horizontal offset relative to the document (CSS pixels). PageY float64 `json:"pageY"` // Vertical offset relative to the document (CSS pixels). ClientWidth float64 `json:"clientWidth"` // Width (CSS pixels), excludes scrollbar if present. ClientHeight float64 `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present. Scale float64 `json:"scale"` // Scale relative to the ideal viewport (size at width=device-width). Zoom float64 `json:"zoom,omitempty,omitzero"` // Page zoom factor (CSS to device independent pixels ratio). }
VisualViewport visual viewport position, dimensions, and scale.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-VisualViewport
type WaitForDebuggerParams ¶
type WaitForDebuggerParams struct{}
WaitForDebuggerParams pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
func WaitForDebugger ¶
func WaitForDebugger() *WaitForDebuggerParams
WaitForDebugger pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-waitForDebugger
type WebAppManifest ¶
type WebAppManifest struct { BackgroundColor string `json:"backgroundColor,omitempty,omitzero"` Description string `json:"description,omitempty,omitzero"` // The extra description provided by the manifest. Dir string `json:"dir,omitempty,omitzero"` Display string `json:"display,omitempty,omitzero"` DisplayOverrides []string `json:"displayOverrides,omitempty,omitzero"` // The overrided display mode controlled by the user. FileHandlers []*FileHandler `json:"fileHandlers,omitempty,omitzero"` // The handlers to open files. Icons []*ImageResource `json:"icons,omitempty,omitzero"` ID string `json:"id,omitempty,omitzero"` Lang string `json:"lang,omitempty,omitzero"` LaunchHandler *LaunchHandler `json:"launchHandler,omitempty,omitzero"` // TODO(crbug.com/1231886): This field is non-standard and part of a Chrome experiment. See: https://github.com/WICG/web-app-launch/blob/main/launch_handler.md Name string `json:"name,omitempty,omitzero"` Orientation string `json:"orientation,omitempty,omitzero"` PreferRelatedApplications bool `json:"preferRelatedApplications,omitempty,omitzero"` ProtocolHandlers []*ProtocolHandler `json:"protocolHandlers,omitempty,omitzero"` // The handlers to open protocols. RelatedApplications []*RelatedApplication `json:"relatedApplications,omitempty,omitzero"` Scope string `json:"scope,omitempty,omitzero"` ScopeExtensions []*ScopeExtension `json:"scopeExtensions,omitempty,omitzero"` // Non-standard, see https://github.com/WICG/manifest-incubations/blob/gh-pages/scope_extensions-explainer.md Screenshots []*Screenshot `json:"screenshots,omitempty,omitzero"` // The screenshots used by chromium. ShortName string `json:"shortName,omitempty,omitzero"` Shortcuts []*Shortcut `json:"shortcuts,omitempty,omitzero"` StartURL string `json:"startUrl,omitempty,omitzero"` ThemeColor string `json:"themeColor,omitempty,omitzero"` }
WebAppManifest [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-WebAppManifest