cdp

package
v0.158.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: MIT Imports: 4 Imported by: 648

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call added in v0.157.3

func Call[P, R any](ctx context.Context, s Session, c Command[P, R], params P) (R, error)

Call runs the command on the session, and returns its result.

func Events added in v0.157.3

func Events[E any](ctx context.Context, s Session, e Event[E]) iter.Seq2[E, error]

Events subscribes to the event on the session and returns an iterator over the payloads. The session starts to buffer events when Events returns, not when the caller starts to range. A caller can therefore subscribe, trigger the event, and then range.

The iterator stops when the caller breaks out of the loop or when the session closes. It also stops when the context ends, and it then yields the error of the context. A payload that does not decode yields the decode error and ends the iteration.

A caller must range over the iterator or cancel the context. An iterator that nobody reads holds its subscription.

Types

type AdAncestry

type AdAncestry struct {
	AncestryChain            []*AdScriptIdentifier `json:"ancestryChain"`                               // A chain of AdScriptIdentifiers representing the ancestry of an ad script that led to the creation of a resource or element. The chain is ordered from the script itself (lowest level) up to its root ancestor that was flagged by a filter list.
	RootScriptFilterlistRule string                `json:"rootScriptFilterlistRule,omitempty,omitzero"` // The filter list rule that caused the root (last) script in ancestryChain to be tagged as an ad.
}

AdAncestry encapsulates the script ancestry and the root script filter list rule that caused the resource or element to be labeled as an ad.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AdAncestry

type AdFrameExplanation

type AdFrameExplanation string

AdFrameExplanation [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameExplanation

const (
	AdFrameExplanationParentIsAd          AdFrameExplanation = "ParentIsAd"
	AdFrameExplanationCreatedByAdScript   AdFrameExplanation = "CreatedByAdScript"
	AdFrameExplanationMatchedBlockingRule AdFrameExplanation = "MatchedBlockingRule"
)

AdFrameExplanation values.

func (AdFrameExplanation) String

func (t AdFrameExplanation) String() string

String returns the AdFrameExplanation as string value.

type AdFrameStatus

type AdFrameStatus struct {
	AdFrameType  AdFrameType          `json:"adFrameType"`
	Explanations []AdFrameExplanation `json:"explanations,omitempty,omitzero"`
}

AdFrameStatus indicates whether a frame has been identified as an ad and why.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameStatus

type AdFrameType

type AdFrameType string

AdFrameType indicates whether a frame has been identified as an ad.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-AdFrameType

const (
	AdFrameTypeNone  AdFrameType = "none"
	AdFrameTypeChild AdFrameType = "child"
	AdFrameTypeRoot  AdFrameType = "root"
)

AdFrameType values.

func (AdFrameType) String

func (t AdFrameType) String() string

String returns the AdFrameType as string value.

type AdProvenance

type AdProvenance struct {
	FilterlistRule   string      `json:"filterlistRule,omitempty,omitzero"`   // The filterlist rule that matched, if any.
	AdScriptAncestry *AdAncestry `json:"adScriptAncestry,omitempty,omitzero"` // The script ancestry that created the ad, if any. Note: depending on the context, this may represent the full ancestry up to the root script, or it may contain only one script representing the immediate ancestor.
}

AdProvenance represents the provenance of an ad resource or element. Only one of filterlistRule or adScriptAncestry can be set. If filterlistRule is provided, the resource URL directly matches a filter list rule. If adScriptAncestry is provided, an ad script initiated the resource fetch or appended the element to the DOM. If neither is provided, the entity is known to be an ad, but provenance tracking information is unavailable.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AdProvenance

type AdScriptIdentifier

type AdScriptIdentifier struct {
	ScriptID   ScriptID         `json:"scriptId"`   // The script's V8 identifier.
	DebuggerID UniqueDebuggerID `json:"debuggerId"` // V8's debugging ID for the v8::Context.
	Name       string           `json:"name"`       // The script's url (or generated name based on id if inline script).
}

AdScriptIdentifier identifies the script on the stack that caused a resource or element to be labeled as an ad. For resources, this indicates the context that triggered the fetch. For elements, this indicates the context that caused the element to be appended to the DOM.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AdScriptIdentifier

type BackendNode

type BackendNode struct {
	NodeType      int64         `json:"nodeType"` // Node's nodeType.
	NodeName      string        `json:"nodeName"` // Node's nodeName.
	BackendNodeID BackendNodeID `json:"backendNodeId"`
}

BackendNode backend node with a friendly name.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BackendNode

type BackendNodeID

type BackendNodeID int64

BackendNodeID unique DOM node identifier used to reference a node that may not have been pushed to the front-end.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-BackendNodeId

func (BackendNodeID) Int64

func (t BackendNodeID) Int64() int64

Int64 returns the BackendNodeID as int64 value.

type BrowserContextID

type BrowserContextID string

BrowserContextID [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#type-BrowserContextID

func (BrowserContextID) String

func (t BrowserContextID) String() string

String returns the BrowserContextID as string value.

type Command added in v0.157.3

type Command[P, R any] struct {
	// Method is the name of the command, such as "Page.navigate".
	Method string
}

Command is a protocol command with the parameters P and the result R. The generated code has one value of this type for each command.

type CompatibilityMode

type CompatibilityMode string

CompatibilityMode document compatibility mode.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-CompatibilityMode

const (
	CompatibilityModeQuirksMode        CompatibilityMode = "QuirksMode"
	CompatibilityModeLimitedQuirksMode CompatibilityMode = "LimitedQuirksMode"
	CompatibilityModeNoQuirksMode      CompatibilityMode = "NoQuirksMode"
)

CompatibilityMode values.

func (CompatibilityMode) String

func (t CompatibilityMode) String() string

String returns the CompatibilityMode as string value.

type CrossOriginIsolatedContextType

type CrossOriginIsolatedContextType string

CrossOriginIsolatedContextType indicates whether the frame is cross-origin isolated and why it is the case.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-CrossOriginIsolatedContextType

const (
	CrossOriginIsolatedContextTypeIsolated                   CrossOriginIsolatedContextType = "Isolated"
	CrossOriginIsolatedContextTypeNotIsolated                CrossOriginIsolatedContextType = "NotIsolated"
	CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled CrossOriginIsolatedContextType = "NotIsolatedFeatureDisabled"
)

CrossOriginIsolatedContextType values.

func (CrossOriginIsolatedContextType) String

String returns the CrossOriginIsolatedContextType as string value.

type Empty added in v0.157.3

type Empty struct{}

Empty is the parameters or the result of a command that has none.

type ErrUnknownCommandOrEvent

type ErrUnknownCommandOrEvent string

ErrUnknownCommandOrEvent is an unknown command or event error.

func (ErrUnknownCommandOrEvent) Error

func (err ErrUnknownCommandOrEvent) Error() string

Error satisfies the error interface.

type Error

type Error string

Error is the type of the constant errors of this package.

const (
	// ErrMsgMissingParamsOrResult is the error for a message that has neither
	// params nor a result.
	ErrMsgMissingParamsOrResult Error = "msg missing params or result"
)

Error values.

func (Error) Error

func (err Error) Error() string

Error satisfies the error interface.

type Event added in v0.157.3

type Event[E any] struct {
	// Method is the name of the event, such as "Page.loadEventFired".
	Method string
}

Event is a protocol event with the payload E. The generated code has one value of this type for each event.

type Frame

type Frame struct {
	ID                             FrameID                        `json:"id"`                                       // Frame unique identifier.
	ParentID                       FrameID                        `json:"parentId,omitempty,omitzero"`              // Parent frame identifier.
	LoaderID                       LoaderID                       `json:"loaderId"`                                 // Identifier of the loader associated with this frame.
	Name                           string                         `json:"name,omitempty,omitzero"`                  // Frame's name as specified in the tag.
	URL                            string                         `json:"url"`                                      // Frame document's URL without fragment.
	URLFragment                    string                         `json:"urlFragment,omitempty,omitzero"`           // Frame document's URL fragment including the '#'.
	DomainAndRegistry              string                         `json:"domainAndRegistry"`                        // Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com" http://a.b.co.uk/file.html      -> "b.co.uk"
	SecurityOrigin                 string                         `json:"securityOrigin"`                           // Frame document's security origin.
	SecurityOriginDetails          *SecurityOriginDetails         `json:"securityOriginDetails,omitempty,omitzero"` // Additional details about the frame document's security origin.
	MimeType                       string                         `json:"mimeType"`                                 // Frame document's mimeType as determined by the browser.
	UnreachableURL                 string                         `json:"unreachableUrl,omitempty,omitzero"`        // If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
	AdFrameStatus                  *AdFrameStatus                 `json:"adFrameStatus,omitempty,omitzero"`         // Indicates whether this frame was tagged as an ad and why.
	SecureContextType              SecureContextType              `json:"secureContextType"`                        // Indicates whether the main document is a secure context and explains why that is the case.
	CrossOriginIsolatedContextType CrossOriginIsolatedContextType `json:"crossOriginIsolatedContextType"`           // Indicates whether this is a cross origin isolated context.
	GatedAPIFeatures               []GatedAPIFeatures             `json:"gatedAPIFeatures"`                         // Indicated which gated APIs / features are available.
}

Frame information about the Frame on the page.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-Frame

type FrameID

type FrameID string

FrameID unique frame identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-FrameId

func (FrameID) String

func (t FrameID) String() string

String returns the FrameID as string value.

type GatedAPIFeatures

type GatedAPIFeatures string

GatedAPIFeatures [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-GatedAPIFeatures

const (
	GatedAPIFeaturesSharedArrayBuffers                GatedAPIFeatures = "SharedArrayBuffers"
	GatedAPIFeaturesSharedArrayBuffersTransferAllowed GatedAPIFeatures = "SharedArrayBuffersTransferAllowed"
	GatedAPIFeaturesPerformanceMeasureMemory          GatedAPIFeatures = "PerformanceMeasureMemory"
	GatedAPIFeaturesPerformanceProfile                GatedAPIFeatures = "PerformanceProfile"
)

GatedAPIFeatures values.

func (GatedAPIFeatures) String

func (t GatedAPIFeatures) String() string

String returns the GatedAPIFeatures as string value.

type LoaderID

type LoaderID string

LoaderID unique loader identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-LoaderId

func (LoaderID) String

func (t LoaderID) String() string

String returns the LoaderID as string value.

type MonotonicTime

type MonotonicTime float64

MonotonicTime monotonically increasing time in seconds since an arbitrary point in the past.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-MonotonicTime

func (MonotonicTime) Float64

func (t MonotonicTime) Float64() float64

Float64 returns the MonotonicTime as float64 value.

type Node

type Node struct {
	NodeID                   NodeID            `json:"nodeId"`                              // Node identifier that is passed into the rest of the DOM messages as the nodeId. Backend will only push node with given id once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
	ParentID                 NodeID            `json:"parentId,omitempty,omitzero"`         // The id of the parent node if any.
	BackendNodeID            BackendNodeID     `json:"backendNodeId"`                       // The BackendNodeId for this node.
	NodeType                 int64             `json:"nodeType"`                            // Node's nodeType.
	NodeName                 string            `json:"nodeName"`                            // Node's nodeName.
	LocalName                string            `json:"localName"`                           // Node's localName.
	NodeValue                string            `json:"nodeValue"`                           // Node's nodeValue.
	ChildNodeCount           int64             `json:"childNodeCount,omitempty,omitzero"`   // Child count for Container nodes.
	Children                 []*Node           `json:"children,omitempty,omitzero"`         // Child nodes of this node when requested with children.
	Attributes               []string          `json:"attributes,omitempty,omitzero"`       // Attributes of the Element node in the form of flat array [name1, value1, name2, value2].
	DocumentURL              string            `json:"documentURL,omitempty,omitzero"`      // Document URL that Document or FrameOwner node points to.
	BaseURL                  string            `json:"baseURL,omitempty,omitzero"`          // Base URL that Document or FrameOwner node uses for URL completion.
	PublicID                 string            `json:"publicId,omitempty,omitzero"`         // DocumentType's publicId.
	SystemID                 string            `json:"systemId,omitempty,omitzero"`         // DocumentType's systemId.
	InternalSubset           string            `json:"internalSubset,omitempty,omitzero"`   // DocumentType's internalSubset.
	XMLVersion               string            `json:"xmlVersion,omitempty,omitzero"`       // Document's XML version in case of XML documents.
	Name                     string            `json:"name,omitempty,omitzero"`             // Attr's name.
	Value                    string            `json:"value,omitempty,omitzero"`            // Attr's value.
	PseudoType               PseudoType        `json:"pseudoType,omitempty,omitzero"`       // Pseudo element type for this node.
	PseudoIdentifier         string            `json:"pseudoIdentifier,omitempty,omitzero"` // Pseudo element identifier for this node. Only present if there is a valid pseudoType.
	ShadowRootType           ShadowRootType    `json:"shadowRootType,omitempty,omitzero"`   // Shadow root type.
	FrameID                  FrameID           `json:"frameId,omitempty,omitzero"`          // Frame ID for frame owner elements.
	ContentDocument          *Node             `json:"contentDocument,omitempty,omitzero"`  // Content document for frame owner elements.
	ShadowRoots              []*Node           `json:"shadowRoots,omitempty,omitzero"`      // Shadow root list for given element host.
	TemplateContent          *Node             `json:"templateContent,omitempty,omitzero"`  // Content document fragment for template elements.
	PseudoElements           []*Node           `json:"pseudoElements,omitempty,omitzero"`   // Pseudo elements associated with this node.
	DistributedNodes         []*BackendNode    `json:"distributedNodes,omitempty,omitzero"` // Distributed nodes for given insertion point.
	IsSVG                    bool              `json:"isSVG"`                               // Whether the node is SVG.
	CompatibilityMode        CompatibilityMode `json:"compatibilityMode,omitempty,omitzero"`
	AssignedSlot             *BackendNode      `json:"assignedSlot,omitempty,omitzero"`
	IsScrollable             bool              `json:"isScrollable"`
	AffectedByStartingStyles bool              `json:"affectedByStartingStyles"`
	AdoptedStyleSheets       []StyleSheetID    `json:"adoptedStyleSheets,omitempty,omitzero"`
	AdProvenance             *AdProvenance     `json:"adProvenance,omitempty,omitzero"`
}

Node DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-Node

type NodeID

type NodeID int64

NodeID unique DOM node identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-NodeId

func (NodeID) Int64

func (t NodeID) Int64() int64

Int64 returns the NodeID as int64 value.

type OriginTrial

type OriginTrial struct {
	TrialName        string                        `json:"trialName"`
	Status           OriginTrialStatus             `json:"status"`
	TokensWithStatus []*OriginTrialTokenWithStatus `json:"tokensWithStatus"`
}

OriginTrial [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrial

type OriginTrialStatus

type OriginTrialStatus string

OriginTrialStatus status for an Origin Trial.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialStatus

const (
	OriginTrialStatusEnabled               OriginTrialStatus = "Enabled"
	OriginTrialStatusValidTokenNotProvided OriginTrialStatus = "ValidTokenNotProvided"
	OriginTrialStatusOSNotSupported        OriginTrialStatus = "OSNotSupported"
	OriginTrialStatusTrialNotAllowed       OriginTrialStatus = "TrialNotAllowed"
)

OriginTrialStatus values.

func (OriginTrialStatus) String

func (t OriginTrialStatus) String() string

String returns the OriginTrialStatus as string value.

type OriginTrialToken

type OriginTrialToken struct {
	Origin           string                      `json:"origin"`
	MatchSubDomains  bool                        `json:"matchSubDomains"`
	TrialName        string                      `json:"trialName"`
	ExpiryTime       TimeSinceEpoch              `json:"expiryTime"`
	IsThirdParty     bool                        `json:"isThirdParty"`
	UsageRestriction OriginTrialUsageRestriction `json:"usageRestriction"`
}

OriginTrialToken [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialToken

type OriginTrialTokenStatus

type OriginTrialTokenStatus string

OriginTrialTokenStatus origin Trial(https://www.chromium.org/blink/origin-trials) support. Status for an Origin Trial token.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialTokenStatus

const (
	OriginTrialTokenStatusSuccess                OriginTrialTokenStatus = "Success"
	OriginTrialTokenStatusNotSupported           OriginTrialTokenStatus = "NotSupported"
	OriginTrialTokenStatusInsecure               OriginTrialTokenStatus = "Insecure"
	OriginTrialTokenStatusExpired                OriginTrialTokenStatus = "Expired"
	OriginTrialTokenStatusWrongOrigin            OriginTrialTokenStatus = "WrongOrigin"
	OriginTrialTokenStatusInvalidSignature       OriginTrialTokenStatus = "InvalidSignature"
	OriginTrialTokenStatusMalformed              OriginTrialTokenStatus = "Malformed"
	OriginTrialTokenStatusWrongVersion           OriginTrialTokenStatus = "WrongVersion"
	OriginTrialTokenStatusFeatureDisabled        OriginTrialTokenStatus = "FeatureDisabled"
	OriginTrialTokenStatusTokenDisabled          OriginTrialTokenStatus = "TokenDisabled"
	OriginTrialTokenStatusFeatureDisabledForUser OriginTrialTokenStatus = "FeatureDisabledForUser"
	OriginTrialTokenStatusUnknownTrial           OriginTrialTokenStatus = "UnknownTrial"
)

OriginTrialTokenStatus values.

func (OriginTrialTokenStatus) String

func (t OriginTrialTokenStatus) String() string

String returns the OriginTrialTokenStatus as string value.

type OriginTrialTokenWithStatus

type OriginTrialTokenWithStatus struct {
	RawTokenText string                 `json:"rawTokenText"`
	ParsedToken  *OriginTrialToken      `json:"parsedToken,omitempty,omitzero"` // parsedToken is present only when the token is extractable and parsable.
	Status       OriginTrialTokenStatus `json:"status"`
}

OriginTrialTokenWithStatus [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialTokenWithStatus

type OriginTrialUsageRestriction

type OriginTrialUsageRestriction string

OriginTrialUsageRestriction [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-OriginTrialUsageRestriction

const (
	OriginTrialUsageRestrictionNone   OriginTrialUsageRestriction = "None"
	OriginTrialUsageRestrictionSubset OriginTrialUsageRestriction = "Subset"
)

OriginTrialUsageRestriction values.

func (OriginTrialUsageRestriction) String

String returns the OriginTrialUsageRestriction as string value.

type PseudoType

type PseudoType string

PseudoType pseudo element type.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-PseudoType

const (
	PseudoTypeFirstLine                   PseudoType = "first-line"
	PseudoTypeFirstLetter                 PseudoType = "first-letter"
	PseudoTypeCheckmark                   PseudoType = "checkmark"
	PseudoTypeBefore                      PseudoType = "before"
	PseudoTypeAfter                       PseudoType = "after"
	PseudoTypeExpandIcon                  PseudoType = "expand-icon"
	PseudoTypePickerIcon                  PseudoType = "picker-icon"
	PseudoTypeInterestButton              PseudoType = "interest-button"
	PseudoTypeMarker                      PseudoType = "marker"
	PseudoTypeBackdrop                    PseudoType = "backdrop"
	PseudoTypeColumn                      PseudoType = "column"
	PseudoTypeSelection                   PseudoType = "selection"
	PseudoTypeSearchText                  PseudoType = "search-text"
	PseudoTypeTargetText                  PseudoType = "target-text"
	PseudoTypeSpellingError               PseudoType = "spelling-error"
	PseudoTypeGrammarError                PseudoType = "grammar-error"
	PseudoTypeHighlight                   PseudoType = "highlight"
	PseudoTypeFirstLineInherited          PseudoType = "first-line-inherited"
	PseudoTypeScrollMarker                PseudoType = "scroll-marker"
	PseudoTypeScrollMarkerGroup           PseudoType = "scroll-marker-group"
	PseudoTypeScrollButton                PseudoType = "scroll-button"
	PseudoTypeScrollbar                   PseudoType = "scrollbar"
	PseudoTypeScrollbarThumb              PseudoType = "scrollbar-thumb"
	PseudoTypeScrollbarButton             PseudoType = "scrollbar-button"
	PseudoTypeScrollbarTrack              PseudoType = "scrollbar-track"
	PseudoTypeScrollbarTrackPiece         PseudoType = "scrollbar-track-piece"
	PseudoTypeScrollbarCorner             PseudoType = "scrollbar-corner"
	PseudoTypeResizer                     PseudoType = "resizer"
	PseudoTypeInputListButton             PseudoType = "input-list-button"
	PseudoTypeViewTransition              PseudoType = "view-transition"
	PseudoTypeViewTransitionGroup         PseudoType = "view-transition-group"
	PseudoTypeViewTransitionImagePair     PseudoType = "view-transition-image-pair"
	PseudoTypeViewTransitionGroupChildren PseudoType = "view-transition-group-children"
	PseudoTypeViewTransitionOld           PseudoType = "view-transition-old"
	PseudoTypeViewTransitionNew           PseudoType = "view-transition-new"
	PseudoTypePlaceholder                 PseudoType = "placeholder"
	PseudoTypeFileSelectorButton          PseudoType = "file-selector-button"
	PseudoTypeDetailsContent              PseudoType = "details-content"
	PseudoTypePicker                      PseudoType = "picker"
	PseudoTypeSelectListbox               PseudoType = "select-listbox"
	PseudoTypePermissionIcon              PseudoType = "permission-icon"
	PseudoTypeOverscrollAreaParent        PseudoType = "overscroll-area-parent"
	PseudoTypeOverscrollBackdrop          PseudoType = "overscroll-backdrop"
	PseudoTypeSkeleton                    PseudoType = "skeleton"
)

PseudoType values.

func (PseudoType) String

func (t PseudoType) String() string

String returns the PseudoType as string value.

type RGBA

type RGBA struct {
	R int64   `json:"r"`                    // The red component, in the [0-255] range.
	G int64   `json:"g"`                    // The green component, in the [0-255] range.
	B int64   `json:"b"`                    // The blue component, in the [0-255] range.
	A float64 `json:"a,omitempty,omitzero"` // The alpha component, in the [0-1] range (default: 1).
}

RGBA a structure holding an RGBA color.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-RGBA

type ScriptID

type ScriptID string

ScriptID unique script identifier.

See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-ScriptId

func (ScriptID) String

func (t ScriptID) String() string

String returns the ScriptID as string value.

type SecureContextType

type SecureContextType string

SecureContextType indicates whether the frame is a secure context and why it is the case.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-SecureContextType

const (
	SecureContextTypeSecure           SecureContextType = "Secure"
	SecureContextTypeSecureLocalhost  SecureContextType = "SecureLocalhost"
	SecureContextTypeInsecureScheme   SecureContextType = "InsecureScheme"
	SecureContextTypeInsecureAncestor SecureContextType = "InsecureAncestor"
)

SecureContextType values.

func (SecureContextType) String

func (t SecureContextType) String() string

String returns the SecureContextType as string value.

type SecurityOriginDetails

type SecurityOriginDetails struct {
	IsLocalhost bool `json:"isLocalhost"` // Indicates whether the frame document's security origin is one of the local hostnames (e.g. "localhost") or IP addresses (IPv4 127.0.0.0/8 or IPv6 ::1).
}

SecurityOriginDetails additional information about the frame document's security origin.

See: https://chromedevtools.github.io/devtools-protocol/tot/Page#type-SecurityOriginDetails

type Session added in v0.157.3

type Session interface {
	// Call sends the command with the params, waits for the response, and decodes
	// the result into result. Call returns an error from the browser as an
	// error.
	Call(ctx context.Context, method string, params, result any) error

	// Subscribe starts to buffer the events of the method, and returns the
	// channel that they arrive on and a func that stops the subscription. A
	// subscription starts when Subscribe returns, so no event that follows is
	// lost.
	Subscribe(method string) (events <-chan jsonv2.Value, cancel func())
}

Session is a connection to a browser target, over which commands run and events arrive.

type ShadowRootType

type ShadowRootType string

ShadowRootType shadow root type.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-ShadowRootType

const (
	ShadowRootTypeUserAgent ShadowRootType = "user-agent"
	ShadowRootTypeOpen      ShadowRootType = "open"
	ShadowRootTypeClosed    ShadowRootType = "closed"
)

ShadowRootType values.

func (ShadowRootType) String

func (t ShadowRootType) String() string

String returns the ShadowRootType as string value.

type StyleSheetID

type StyleSheetID string

StyleSheetID unique identifier for a CSS stylesheet.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#type-StyleSheetId

func (StyleSheetID) String

func (t StyleSheetID) String() string

String returns the StyleSheetID as string value.

type TimeSinceEpoch

type TimeSinceEpoch float64

TimeSinceEpoch UTC time in seconds, counted from January 1, 1970.

See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-TimeSinceEpoch

func (TimeSinceEpoch) Float64

func (t TimeSinceEpoch) Float64() float64

Float64 returns the TimeSinceEpoch as float64 value.

type UniqueDebuggerID

type UniqueDebuggerID string

UniqueDebuggerID unique identifier of current debugger.

See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UniqueDebuggerId

func (UniqueDebuggerID) String

func (t UniqueDebuggerID) String() string

String returns the UniqueDebuggerID as string value.

Directories

Path Synopsis
Package jsonv2 is the JSON layer of the module cdproto.
Package jsonv2 is the JSON layer of the module cdproto.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL