cdproto: github.com/chromedp/cdproto/domsnapshot Index | Files

package domsnapshot

import "github.com/chromedp/cdproto/domsnapshot"

Package domsnapshot provides the Chrome DevTools Protocol commands, types, and events for the DOMSnapshot domain.

This domain facilitates obtaining document snapshots with DOM, layout, and style information.

Generated by the cdproto-gen command.

Index

Package Files

domsnapshot.go easyjson.go types.go

Constants

const (
    CommandDisable         = "DOMSnapshot.disable"
    CommandEnable          = "DOMSnapshot.enable"
    CommandCaptureSnapshot = "DOMSnapshot.captureSnapshot"
)

Command names.

type ArrayOfStrings Uses

type ArrayOfStrings []int64

ArrayOfStrings index of the string in the strings table.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-ArrayOfStrings

type CaptureSnapshotParams Uses

type CaptureSnapshotParams struct {
    ComputedStyles    []string `json:"computedStyles"`              // Whitelist of computed styles to return.
    IncludePaintOrder bool     `json:"includePaintOrder,omitempty"` // Whether to include layout object paint orders into the snapshot.
    IncludeDOMRects   bool     `json:"includeDOMRects,omitempty"`   // Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
}

CaptureSnapshotParams returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.

func CaptureSnapshot Uses

func CaptureSnapshot(computedStyles []string) *CaptureSnapshotParams

CaptureSnapshot returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-captureSnapshot

parameters:

computedStyles - Whitelist of computed styles to return.

func (*CaptureSnapshotParams) Do Uses

func (p *CaptureSnapshotParams) Do(ctx context.Context) (documents []*DocumentSnapshot, strings []string, err error)

Do executes DOMSnapshot.captureSnapshot against the provided context.

returns:

documents - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
strings - Shared string table that all string properties refer to with indexes.

func (CaptureSnapshotParams) MarshalEasyJSON Uses

func (v CaptureSnapshotParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CaptureSnapshotParams) MarshalJSON Uses

func (v CaptureSnapshotParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CaptureSnapshotParams) UnmarshalEasyJSON Uses

func (v *CaptureSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CaptureSnapshotParams) UnmarshalJSON Uses

func (v *CaptureSnapshotParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (CaptureSnapshotParams) WithIncludeDOMRects Uses

func (p CaptureSnapshotParams) WithIncludeDOMRects(includeDOMRects bool) *CaptureSnapshotParams

WithIncludeDOMRects whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot.

func (CaptureSnapshotParams) WithIncludePaintOrder Uses

func (p CaptureSnapshotParams) WithIncludePaintOrder(includePaintOrder bool) *CaptureSnapshotParams

WithIncludePaintOrder whether to include layout object paint orders into the snapshot.

type CaptureSnapshotReturns Uses

type CaptureSnapshotReturns struct {
    Documents []*DocumentSnapshot `json:"documents,omitempty"` // The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
    Strings   []string            `json:"strings,omitempty"`   // Shared string table that all string properties refer to with indexes.
}

CaptureSnapshotReturns return values.

func (CaptureSnapshotReturns) MarshalEasyJSON Uses

func (v CaptureSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (CaptureSnapshotReturns) MarshalJSON Uses

func (v CaptureSnapshotReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*CaptureSnapshotReturns) UnmarshalEasyJSON Uses

func (v *CaptureSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CaptureSnapshotReturns) UnmarshalJSON Uses

func (v *CaptureSnapshotReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type ComputedStyle Uses

type ComputedStyle struct {
    Properties []*NameValue `json:"properties"` // Name/value pairs of computed style properties.
}

ComputedStyle a subset of the full ComputedStyle as defined by the request whitelist.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-ComputedStyle

func (ComputedStyle) MarshalEasyJSON Uses

func (v ComputedStyle) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (ComputedStyle) MarshalJSON Uses

func (v ComputedStyle) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*ComputedStyle) UnmarshalEasyJSON Uses

func (v *ComputedStyle) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ComputedStyle) UnmarshalJSON Uses

func (v *ComputedStyle) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DOMNode Uses

type DOMNode struct {
    NodeType             cdp.NodeType                 `json:"nodeType"`                       // Node's nodeType.
    NodeName             string                       `json:"nodeName"`                       // Node's nodeName.
    NodeValue            string                       `json:"nodeValue"`                      // Node's nodeValue.
    TextValue            string                       `json:"textValue,omitempty"`            // Only set for textarea elements, contains the text value.
    InputValue           string                       `json:"inputValue,omitempty"`           // Only set for input elements, contains the input's associated text value.
    InputChecked         bool                         `json:"inputChecked,omitempty"`         // Only set for radio and checkbox input elements, indicates if the element has been checked
    OptionSelected       bool                         `json:"optionSelected,omitempty"`       // Only set for option elements, indicates if the element has been selected
    BackendNodeID        cdp.BackendNodeID            `json:"backendNodeId"`                  // Node's id, corresponds to DOM.Node.backendNodeId.
    ChildNodeIndexes     []int64                      `json:"childNodeIndexes,omitempty"`     // The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any.
    Attributes           []*NameValue                 `json:"attributes,omitempty"`           // Attributes of an Element node.
    PseudoElementIndexes []int64                      `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any.
    LayoutNodeIndex      int64                        `json:"layoutNodeIndex,omitempty"`      // The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any.
    DocumentURL          string                       `json:"documentURL,omitempty"`          // Document URL that Document or FrameOwner node points to.
    BaseURL              string                       `json:"baseURL,omitempty"`              // Base URL that Document or FrameOwner node uses for URL completion.
    ContentLanguage      string                       `json:"contentLanguage,omitempty"`      // Only set for documents, contains the document's content language.
    DocumentEncoding     string                       `json:"documentEncoding,omitempty"`     // Only set for documents, contains the document's character set encoding.
    PublicID             string                       `json:"publicId,omitempty"`             // DocumentType node's publicId.
    SystemID             string                       `json:"systemId,omitempty"`             // DocumentType node's systemId.
    FrameID              cdp.FrameID                  `json:"frameId,omitempty"`              // Frame ID for frame owner elements and also for the document node.
    ContentDocumentIndex int64                        `json:"contentDocumentIndex,omitempty"` // The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any.
    PseudoType           cdp.PseudoType               `json:"pseudoType,omitempty"`           // Type of a pseudo element node.
    ShadowRootType       cdp.ShadowRootType           `json:"shadowRootType,omitempty"`       // Shadow root type.
    IsClickable          bool                         `json:"isClickable,omitempty"`          // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
    EventListeners       []*domdebugger.EventListener `json:"eventListeners,omitempty"`       // Details of the node's event listeners, if any.
    CurrentSourceURL     string                       `json:"currentSourceURL,omitempty"`     // The selected url for nodes with a srcset attribute.
    OriginURL            string                       `json:"originURL,omitempty"`            // The url of the script (if any) that generates this node.
    ScrollOffsetX        float64                      `json:"scrollOffsetX,omitempty"`        // Scroll offsets, set when this node is a Document.
    ScrollOffsetY        float64                      `json:"scrollOffsetY,omitempty"`
}

DOMNode a Node in the DOM tree.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-DOMNode

func (DOMNode) MarshalEasyJSON Uses

func (v DOMNode) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DOMNode) MarshalJSON Uses

func (v DOMNode) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DOMNode) UnmarshalEasyJSON Uses

func (v *DOMNode) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DOMNode) UnmarshalJSON Uses

func (v *DOMNode) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DisableParams Uses

type DisableParams struct{}

DisableParams disables DOM snapshot agent for the given page.

func Disable Uses

func Disable() *DisableParams

Disable disables DOM snapshot agent for the given page.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-disable

func (*DisableParams) Do Uses

func (p *DisableParams) Do(ctx context.Context) (err error)

Do executes DOMSnapshot.disable against the provided context.

func (DisableParams) MarshalEasyJSON Uses

func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON Uses

func (v DisableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON Uses

func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON Uses

func (v *DisableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type DocumentSnapshot Uses

type DocumentSnapshot struct {
    DocumentURL     StringIndex         `json:"documentURL"`             // Document URL that Document or FrameOwner node points to.
    Title           StringIndex         `json:"title"`                   // Document title.
    BaseURL         StringIndex         `json:"baseURL"`                 // Base URL that Document or FrameOwner node uses for URL completion.
    ContentLanguage StringIndex         `json:"contentLanguage"`         // Contains the document's content language.
    EncodingName    StringIndex         `json:"encodingName"`            // Contains the document's character set encoding.
    PublicID        StringIndex         `json:"publicId"`                // DocumentType node's publicId.
    SystemID        StringIndex         `json:"systemId"`                // DocumentType node's systemId.
    FrameID         StringIndex         `json:"frameId"`                 // Frame ID for frame owner elements and also for the document node.
    Nodes           *NodeTreeSnapshot   `json:"nodes"`                   // A table with dom nodes.
    Layout          *LayoutTreeSnapshot `json:"layout"`                  // The nodes in the layout tree.
    TextBoxes       *TextBoxSnapshot    `json:"textBoxes"`               // The post-layout inline text nodes.
    ScrollOffsetX   float64             `json:"scrollOffsetX,omitempty"` // Horizontal scroll offset.
    ScrollOffsetY   float64             `json:"scrollOffsetY,omitempty"` // Vertical scroll offset.
    ContentWidth    float64             `json:"contentWidth,omitempty"`  // Document content width.
    ContentHeight   float64             `json:"contentHeight,omitempty"` // Document content height.
}

DocumentSnapshot document snapshot.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-DocumentSnapshot

func (DocumentSnapshot) MarshalEasyJSON Uses

func (v DocumentSnapshot) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (DocumentSnapshot) MarshalJSON Uses

func (v DocumentSnapshot) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*DocumentSnapshot) UnmarshalEasyJSON Uses

func (v *DocumentSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DocumentSnapshot) UnmarshalJSON Uses

func (v *DocumentSnapshot) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams Uses

type EnableParams struct{}

EnableParams enables DOM snapshot agent for the given page.

func Enable Uses

func Enable() *EnableParams

Enable enables DOM snapshot agent for the given page.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-enable

func (*EnableParams) Do Uses

func (p *EnableParams) Do(ctx context.Context) (err error)

Do executes DOMSnapshot.enable against the provided context.

func (EnableParams) MarshalEasyJSON Uses

func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON Uses

func (v EnableParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON Uses

func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON Uses

func (v *EnableParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type InlineTextBox Uses

type InlineTextBox struct {
    BoundingBox         *dom.Rect `json:"boundingBox"`         // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
    StartCharacterIndex int64     `json:"startCharacterIndex"` // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
    NumCharacters       int64     `json:"numCharacters"`       // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
}

InlineTextBox details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-InlineTextBox

func (InlineTextBox) MarshalEasyJSON Uses

func (v InlineTextBox) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (InlineTextBox) MarshalJSON Uses

func (v InlineTextBox) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*InlineTextBox) UnmarshalEasyJSON Uses

func (v *InlineTextBox) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*InlineTextBox) UnmarshalJSON Uses

func (v *InlineTextBox) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LayoutTreeNode Uses

type LayoutTreeNode struct {
    DomNodeIndex      int64            `json:"domNodeIndex"`                // The index of the related DOM node in the domNodes array returned by getSnapshot.
    BoundingBox       *dom.Rect        `json:"boundingBox"`                 // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
    LayoutText        string           `json:"layoutText,omitempty"`        // Contents of the LayoutText, if any.
    InlineTextNodes   []*InlineTextBox `json:"inlineTextNodes,omitempty"`   // The post-layout inline text nodes, if any.
    StyleIndex        int64            `json:"styleIndex,omitempty"`        // Index into the computedStyles array returned by getSnapshot.
    PaintOrder        int64            `json:"paintOrder,omitempty"`        // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in getSnapshot was true.
    IsStackingContext bool             `json:"isStackingContext,omitempty"` // Set to true to indicate the element begins a new stacking context.
}

LayoutTreeNode details of an element in the DOM tree with a LayoutObject.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-LayoutTreeNode

func (LayoutTreeNode) MarshalEasyJSON Uses

func (v LayoutTreeNode) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LayoutTreeNode) MarshalJSON Uses

func (v LayoutTreeNode) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LayoutTreeNode) UnmarshalEasyJSON Uses

func (v *LayoutTreeNode) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LayoutTreeNode) UnmarshalJSON Uses

func (v *LayoutTreeNode) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type LayoutTreeSnapshot Uses

type LayoutTreeSnapshot struct {
    NodeIndex        []int64          `json:"nodeIndex"`             // Index of the corresponding node in the NodeTreeSnapshot array returned by captureSnapshot.
    Styles           []ArrayOfStrings `json:"styles"`                // Array of indexes specifying computed style strings, filtered according to the computedStyles parameter passed to captureSnapshot.
    Bounds           []Rectangle      `json:"bounds"`                // The absolute position bounding box.
    Text             []StringIndex    `json:"text"`                  // Contents of the LayoutText, if any.
    StackingContexts *RareBooleanData `json:"stackingContexts"`      // Stacking context information.
    PaintOrders      []int64          `json:"paintOrders,omitempty"` // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.
    OffsetRects      []Rectangle      `json:"offsetRects,omitempty"` // The offset rect of nodes. Only available when includeDOMRects is set to true
    ScrollRects      []Rectangle      `json:"scrollRects,omitempty"` // The scroll rect of nodes. Only available when includeDOMRects is set to true
    ClientRects      []Rectangle      `json:"clientRects,omitempty"` // The client rect of nodes. Only available when includeDOMRects is set to true
}

LayoutTreeSnapshot table of details of an element in the DOM tree with a LayoutObject.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-LayoutTreeSnapshot

func (LayoutTreeSnapshot) MarshalEasyJSON Uses

func (v LayoutTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (LayoutTreeSnapshot) MarshalJSON Uses

func (v LayoutTreeSnapshot) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*LayoutTreeSnapshot) UnmarshalEasyJSON Uses

func (v *LayoutTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*LayoutTreeSnapshot) UnmarshalJSON Uses

func (v *LayoutTreeSnapshot) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type NameValue Uses

type NameValue struct {
    Name  string `json:"name"`  // Attribute/property name.
    Value string `json:"value"` // Attribute/property value.
}

NameValue a name/value pair.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-NameValue

func (NameValue) MarshalEasyJSON Uses

func (v NameValue) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (NameValue) MarshalJSON Uses

func (v NameValue) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*NameValue) UnmarshalEasyJSON Uses

func (v *NameValue) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NameValue) UnmarshalJSON Uses

func (v *NameValue) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type NodeTreeSnapshot Uses

type NodeTreeSnapshot struct {
    ParentIndex          []int64             `json:"parentIndex,omitempty"`          // Parent node index.
    NodeType             []int64             `json:"nodeType,omitempty"`             // Node's nodeType.
    NodeName             []StringIndex       `json:"nodeName,omitempty"`             // Node's nodeName.
    NodeValue            []StringIndex       `json:"nodeValue,omitempty"`            // Node's nodeValue.
    BackendNodeID        []cdp.BackendNodeID `json:"backendNodeId,omitempty"`        // Node's id, corresponds to DOM.Node.backendNodeId.
    Attributes           []ArrayOfStrings    `json:"attributes,omitempty"`           // Attributes of an Element node. Flatten name, value pairs.
    TextValue            *RareStringData     `json:"textValue,omitempty"`            // Only set for textarea elements, contains the text value.
    InputValue           *RareStringData     `json:"inputValue,omitempty"`           // Only set for input elements, contains the input's associated text value.
    InputChecked         *RareBooleanData    `json:"inputChecked,omitempty"`         // Only set for radio and checkbox input elements, indicates if the element has been checked
    OptionSelected       *RareBooleanData    `json:"optionSelected,omitempty"`       // Only set for option elements, indicates if the element has been selected
    ContentDocumentIndex *RareIntegerData    `json:"contentDocumentIndex,omitempty"` // The index of the document in the list of the snapshot documents.
    PseudoType           *RareStringData     `json:"pseudoType,omitempty"`           // Type of a pseudo element node.
    IsClickable          *RareBooleanData    `json:"isClickable,omitempty"`          // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
    CurrentSourceURL     *RareStringData     `json:"currentSourceURL,omitempty"`     // The selected url for nodes with a srcset attribute.
    OriginURL            *RareStringData     `json:"originURL,omitempty"`            // The url of the script (if any) that generates this node.
}

NodeTreeSnapshot table containing nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-NodeTreeSnapshot

func (NodeTreeSnapshot) MarshalEasyJSON Uses

func (v NodeTreeSnapshot) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (NodeTreeSnapshot) MarshalJSON Uses

func (v NodeTreeSnapshot) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*NodeTreeSnapshot) UnmarshalEasyJSON Uses

func (v *NodeTreeSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*NodeTreeSnapshot) UnmarshalJSON Uses

func (v *NodeTreeSnapshot) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RareBooleanData Uses

type RareBooleanData struct {
    Index []int64 `json:"index"`
}

RareBooleanData [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareBooleanData

func (RareBooleanData) MarshalEasyJSON Uses

func (v RareBooleanData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RareBooleanData) MarshalJSON Uses

func (v RareBooleanData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RareBooleanData) UnmarshalEasyJSON Uses

func (v *RareBooleanData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RareBooleanData) UnmarshalJSON Uses

func (v *RareBooleanData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RareIntegerData Uses

type RareIntegerData struct {
    Index []int64 `json:"index"`
    Value []int64 `json:"value"`
}

RareIntegerData [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareIntegerData

func (RareIntegerData) MarshalEasyJSON Uses

func (v RareIntegerData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RareIntegerData) MarshalJSON Uses

func (v RareIntegerData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RareIntegerData) UnmarshalEasyJSON Uses

func (v *RareIntegerData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RareIntegerData) UnmarshalJSON Uses

func (v *RareIntegerData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RareStringData Uses

type RareStringData struct {
    Index []int64       `json:"index"`
    Value []StringIndex `json:"value"`
}

RareStringData data that is only present on rare nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-RareStringData

func (RareStringData) MarshalEasyJSON Uses

func (v RareStringData) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RareStringData) MarshalJSON Uses

func (v RareStringData) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RareStringData) UnmarshalEasyJSON Uses

func (v *RareStringData) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RareStringData) UnmarshalJSON Uses

func (v *RareStringData) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Rectangle Uses

type Rectangle []float64

Rectangle [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-Rectangle

type StringIndex Uses

type StringIndex int64

StringIndex index of the string in the strings table.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-StringIndex

func (StringIndex) Int64 Uses

func (t StringIndex) Int64() int64

Int64 returns the StringIndex as int64 value.

type TextBoxSnapshot Uses

type TextBoxSnapshot struct {
    LayoutIndex []int64     `json:"layoutIndex"` // Index of the layout tree node that owns this box collection.
    Bounds      []Rectangle `json:"bounds"`      // The absolute position bounding box.
    Start       []int64     `json:"start"`       // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
    Length      []int64     `json:"length"`      // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
}

TextBoxSnapshot table of details of the post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.

See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#type-TextBoxSnapshot

func (TextBoxSnapshot) MarshalEasyJSON Uses

func (v TextBoxSnapshot) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TextBoxSnapshot) MarshalJSON Uses

func (v TextBoxSnapshot) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TextBoxSnapshot) UnmarshalEasyJSON Uses

func (v *TextBoxSnapshot) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TextBoxSnapshot) UnmarshalJSON Uses

func (v *TextBoxSnapshot) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Package domsnapshot imports 8 packages (graph) and is imported by 3 packages. Updated 2021-01-05. Refresh now. Tools for package owners.