cdp

package
v0.0.0-...-d308e07 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 9 Imported by: 626

Documentation

Index

Constants

View Source
const EmptyFrameID = FrameID("")

EmptyFrameID is the "non-existent" frame id.

View Source
const EmptyNodeID = NodeID(0)

EmptyNodeID is the "non-existent" node id.

Variables

View Source
var MonotonicTimeEpoch *time.Time

MonotonicTimeEpoch is the MonotonicTime time epoch.

Functions

func Execute

func Execute(ctx context.Context, method string, params, res any) error

Execute uses the context's message executor to send a command or event method marshaling the provided parameters, and unmarshaling to res.

func WithExecutor

func WithExecutor(parent context.Context, executor Executor) context.Context

WithExecutor sets the message executor for the context.

Types

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.

func (*AdFrameExplanation) UnmarshalJSON

func (t *AdFrameExplanation) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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.

func (*AdFrameType) UnmarshalJSON

func (t *AdFrameType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type BackendNode

type BackendNode struct {
	NodeType      NodeType      `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.

func (*BackendNodeID) UnmarshalJSON

func (t *BackendNodeID) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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 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.

func (*CompatibilityMode) UnmarshalJSON

func (t *CompatibilityMode) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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.

func (*CrossOriginIsolatedContextType) UnmarshalJSON

func (t *CrossOriginIsolatedContextType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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 a error.

const (
	// ErrInvalidContext is the invalid context error.
	ErrInvalidContext Error = "invalid context"

	// ErrMsgMissingParamsOrResult is the msg missing params or result error.
	ErrMsgMissingParamsOrResult Error = "msg missing params or result"
)

Error values.

func (Error) Error

func (err Error) Error() string

Error satisfies the error interface.

type Executor

type Executor interface {
	// Execute executes the command.
	Execute(context.Context, string, any, any) error
}

Executor is the common interface for executing a command.

func ExecutorFromContext

func ExecutorFromContext(ctx context.Context) Executor

ExecutorFromContext returns the message executor for the context.

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.
	State                          FrameState                     `json:"-"`                                        // Frame state.
	Root                           *Node                          `json:"-"`                                        // Frame document root.
	Nodes                          map[NodeID]*Node               `json:"-"`                                        // Frame nodes.
	sync.RWMutex                   `json:"-"`                     // Read write mutex.
}

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.

func (*FrameID) UnmarshalJSON

func (t *FrameID) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type FrameState

type FrameState uint16

FrameState is the state of a Frame.

const (
	FrameDOMContentEventFired FrameState = 1 << (15 - iota)
	FrameLoadEventFired
	FrameAttached
	FrameNavigated
	FrameLoading
	FrameScheduledNavigation
)

FrameState enum values.

func (FrameState) String

func (fs FrameState) String() string

String satisfies stringer interface.

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.

func (*GatedAPIFeatures) UnmarshalJSON

func (t *GatedAPIFeatures) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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 time.Time

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) MarshalJSON

func (t MonotonicTime) MarshalJSON() ([]byte, error)

MarshalJSON satisfies [json.Marshaler].

func (MonotonicTime) Time

func (t MonotonicTime) Time() time.Time

Time returns the MonotonicTime as time.Time value.

func (*MonotonicTime) UnmarshalJSON

func (t *MonotonicTime) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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          NodeType          `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"`
	Parent            *Node             `json:"-"` // Parent node.
	Invalidated       chan struct{}     `json:"-"` // Invalidated channel.
	State             NodeState         `json:"-"` // Node state.
	sync.RWMutex      `json:"-"`        // Read write mutex.
}

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

func (*Node) Attribute

func (n *Node) Attribute(name string) (string, bool)

Attribute returns the named attribute for the node and if it exists.

func (*Node) AttributeValue

func (n *Node) AttributeValue(name string) string

AttributeValue returns the named attribute for the node.

func (*Node) Dump

func (n *Node) Dump(prefix, indent string, nodeIDs bool) string

Dump builds a printable string representation of the node and its children.

func (*Node) FullXPath

func (n *Node) FullXPath() string

FullXPath returns the full XPath for the node, stopping only at the top most document root.

func (*Node) FullXPathByID

func (n *Node) FullXPathByID() string

FullXPathByID returns the full XPath for the node, stopping at the top most document root or at the closest parent node with an id attribute.

func (*Node) PartialXPath

func (n *Node) PartialXPath() string

PartialXPath returns the partial XPath for the node, stopping at the nearest parent document node.

func (*Node) PartialXPathByID

func (n *Node) PartialXPathByID() string

PartialXPathByID returns the partial XPath for the node, stopping at the first parent with an id attribute or at nearest parent document node.

func (*Node) WriteTo

func (n *Node) WriteTo(w io.Writer, prefix, indent string, nodeIDs bool) (int, error)

WriteTo writes a readable representation of the node and all its children to w.

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.

func (*NodeID) UnmarshalJSON

func (t *NodeID) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type NodeState

type NodeState uint8

NodeState is the state of a DOM node.

const (
	NodeReady NodeState = 1 << (7 - iota)
	NodeVisible
	NodeHighlighted
)

NodeState enum values.

func (NodeState) String

func (ns NodeState) String() string

String satisfies stringer interface.

type NodeType

type NodeType int64

NodeType node type.

See: https://developer.mozilla.org/en/docs/Web/API/Node/nodeType

const (
	NodeTypeElement               NodeType = 1
	NodeTypeAttribute             NodeType = 2
	NodeTypeText                  NodeType = 3
	NodeTypeCDATA                 NodeType = 4
	NodeTypeEntityReference       NodeType = 5
	NodeTypeEntity                NodeType = 6
	NodeTypeProcessingInstruction NodeType = 7
	NodeTypeComment               NodeType = 8
	NodeTypeDocument              NodeType = 9
	NodeTypeDocumentType          NodeType = 10
	NodeTypeDocumentFragment      NodeType = 11
	NodeTypeNotation              NodeType = 12
)

NodeType values.

func (NodeType) Int64

func (t NodeType) Int64() int64

Int64 returns the NodeType as int64 value.

func (NodeType) String

func (t NodeType) String() string

String satisfies the fmt.Stringer interface.

func (*NodeType) UnmarshalJSON

func (t *NodeType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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.

func (*OriginTrialStatus) UnmarshalJSON

func (t *OriginTrialStatus) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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.

func (*OriginTrialTokenStatus) UnmarshalJSON

func (t *OriginTrialTokenStatus) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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.

func (*OriginTrialUsageRestriction) UnmarshalJSON

func (t *OriginTrialUsageRestriction) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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"
	PseudoTypePickerIcon                  PseudoType = "picker-icon"
	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"
	PseudoTypePermissionIcon              PseudoType = "permission-icon"
)

PseudoType values.

func (PseudoType) String

func (t PseudoType) String() string

String returns the PseudoType as string value.

func (*PseudoType) UnmarshalJSON

func (t *PseudoType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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"` // 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 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.

func (*SecureContextType) UnmarshalJSON

func (t *SecureContextType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

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 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.

func (*ShadowRootType) UnmarshalJSON

func (t *ShadowRootType) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type TimeSinceEpoch

type TimeSinceEpoch time.Time

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

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

func (TimeSinceEpoch) MarshalJSON

func (t TimeSinceEpoch) MarshalJSON() ([]byte, error)

MarshalJSON satisfies [json.Marshaler].

func (TimeSinceEpoch) Time

func (t TimeSinceEpoch) Time() time.Time

Time returns the TimeSinceEpoch as time.Time value.

func (*TimeSinceEpoch) UnmarshalJSON

func (t *TimeSinceEpoch) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

type TimeSinceEpochMilli

type TimeSinceEpochMilli time.Time

TimeSinceEpochMilli special timestamp type for Response's responseTime field.

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

func (TimeSinceEpochMilli) MarshalJSON

func (t TimeSinceEpochMilli) MarshalJSON() ([]byte, error)

MarshalJSON satisfies [json.Marshaler].

func (TimeSinceEpochMilli) Time

func (t TimeSinceEpochMilli) Time() time.Time

Time returns the TimeSinceEpochMilli as time.Time value.

func (*TimeSinceEpochMilli) UnmarshalJSON

func (t *TimeSinceEpochMilli) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies [json.Unmarshaler].

Jump to

Keyboard shortcuts

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