Documentation
¶
Overview ¶
Package domsnapshot provides Go bindings for the `DOMSnapshot` domain (https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot) in the Chrome DevTools Protocol (CDP), version 1.3.
This domain facilitates obtaining document snapshots with DOM, layout, and style information.
This domain is experimental!
Code generated by https://github.com/daabr/chrome-vision/cmd/cdpgen - DO NOT EDIT.
Index ¶
- type ArrayOfStrings
- type CaptureSnapshot
- func (t *CaptureSnapshot) Do(ctx context.Context) (*CaptureSnapshotResult, error)
- func (t *CaptureSnapshot) ParseResponse(m *devtools.Message) (*CaptureSnapshotResult, error)
- func (t *CaptureSnapshot) SetIncludeBlendedBackgroundColors(v bool) *CaptureSnapshot
- func (t *CaptureSnapshot) SetIncludeDOMRects(v bool) *CaptureSnapshot
- func (t *CaptureSnapshot) SetIncludePaintOrder(v bool) *CaptureSnapshot
- func (t *CaptureSnapshot) SetIncludeTextColorOpacities(v bool) *CaptureSnapshot
- func (t *CaptureSnapshot) Start(ctx context.Context) (chan *devtools.Message, error)
- type CaptureSnapshotResult
- type ComputedStyle
- type DOMNode
- type Disable
- type DocumentSnapshot
- type Enable
- type GetSnapshot
- func (t *GetSnapshot) Do(ctx context.Context) (*GetSnapshotResult, error)
- func (t *GetSnapshot) ParseResponse(m *devtools.Message) (*GetSnapshotResult, error)
- func (t *GetSnapshot) SetIncludeEventListeners(v bool) *GetSnapshot
- func (t *GetSnapshot) SetIncludePaintOrder(v bool) *GetSnapshot
- func (t *GetSnapshot) SetIncludeUserAgentShadowTree(v bool) *GetSnapshot
- func (t *GetSnapshot) Start(ctx context.Context) (chan *devtools.Message, error)
- type GetSnapshotResult
- type InlineTextBox
- type LayoutTreeNode
- type LayoutTreeSnapshot
- type NameValue
- type NodeTreeSnapshot
- type RareBooleanData
- type RareIntegerData
- type RareStringData
- type Rectangle
- type StringIndex
- type TextBoxSnapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayOfStrings ¶
type ArrayOfStrings []StringIndex
ArrayOfStrings data type. Index of the string in the strings table.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-ArrayOfStrings
type CaptureSnapshot ¶
type CaptureSnapshot struct {
// Whitelist of computed styles to return.
ComputedStyles []string `json:"computedStyles"`
// Whether to include layout object paint orders into the snapshot.
IncludePaintOrder bool `json:"includePaintOrder,omitempty"`
// Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
IncludeDOMRects bool `json:"includeDOMRects,omitempty"`
// Whether to include blended background colors in the snapshot (default: false).
// Blended background color is achieved by blending background colors of all elements
// that overlap with the current element.
//
// This CDP parameter is experimental.
IncludeBlendedBackgroundColors bool `json:"includeBlendedBackgroundColors,omitempty"`
// Whether to include text color opacity in the snapshot (default: false).
// An element might have the opacity property set that affects the text color of the element.
// The final text color opacity is computed based on the opacity of all overlapping elements.
//
// This CDP parameter is experimental.
IncludeTextColorOpacities bool `json:"includeTextColorOpacities,omitempty"`
}
CaptureSnapshot contains the parameters, and acts as a Go receiver, for the CDP command `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.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-captureSnapshot
func NewCaptureSnapshot ¶
func NewCaptureSnapshot(computedStyles []string) *CaptureSnapshot
NewCaptureSnapshot constructs a new CaptureSnapshot struct instance, with all (but only) the required parameters. Optional parameters may be added using the builder-like methods below.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-captureSnapshot
func (*CaptureSnapshot) Do ¶
func (t *CaptureSnapshot) Do(ctx context.Context) (*CaptureSnapshotResult, error)
Do sends the CaptureSnapshot CDP command to a browser, and returns the browser's response.
func (*CaptureSnapshot) ParseResponse ¶
func (t *CaptureSnapshot) ParseResponse(m *devtools.Message) (*CaptureSnapshotResult, error)
ParseResponse parses the browser's response to the CaptureSnapshot CDP command.
func (*CaptureSnapshot) SetIncludeBlendedBackgroundColors ¶
func (t *CaptureSnapshot) SetIncludeBlendedBackgroundColors(v bool) *CaptureSnapshot
SetIncludeBlendedBackgroundColors adds or modifies the value of the optional parameter `includeBlendedBackgroundColors` in the CaptureSnapshot CDP command.
Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
This CDP parameter is experimental.
func (*CaptureSnapshot) SetIncludeDOMRects ¶
func (t *CaptureSnapshot) SetIncludeDOMRects(v bool) *CaptureSnapshot
SetIncludeDOMRects adds or modifies the value of the optional parameter `includeDOMRects` in the CaptureSnapshot CDP command.
Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
func (*CaptureSnapshot) SetIncludePaintOrder ¶
func (t *CaptureSnapshot) SetIncludePaintOrder(v bool) *CaptureSnapshot
SetIncludePaintOrder adds or modifies the value of the optional parameter `includePaintOrder` in the CaptureSnapshot CDP command.
Whether to include layout object paint orders into the snapshot.
func (*CaptureSnapshot) SetIncludeTextColorOpacities ¶
func (t *CaptureSnapshot) SetIncludeTextColorOpacities(v bool) *CaptureSnapshot
SetIncludeTextColorOpacities adds or modifies the value of the optional parameter `includeTextColorOpacities` in the CaptureSnapshot CDP command.
Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
This CDP parameter is experimental.
type CaptureSnapshotResult ¶
type CaptureSnapshotResult struct {
// The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
Documents []DocumentSnapshot `json:"documents"`
// Shared string table that all string properties refer to with indexes.
Strings []string `json:"strings"`
}
CaptureSnapshotResult contains the browser's response to calling the CaptureSnapshot CDP command with Do().
type ComputedStyle ¶
type ComputedStyle struct {
// Name/value pairs of computed style properties.
Properties []NameValue `json:"properties"`
}
ComputedStyle data type. A subset of the full ComputedStyle as defined by the request whitelist.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-ComputedStyle
type DOMNode ¶
type DOMNode struct {
// `Node`'s nodeType.
NodeType int64 `json:"nodeType"`
// `Node`'s nodeName.
NodeName string `json:"nodeName"`
// `Node`'s nodeValue.
NodeValue string `json:"nodeValue"`
// Only set for textarea elements, contains the text value.
TextValue string `json:"textValue,omitempty"`
// Only set for input elements, contains the input's associated text value.
InputValue string `json:"inputValue,omitempty"`
// Only set for radio and checkbox input elements, indicates if the element has been checked
InputChecked bool `json:"inputChecked,omitempty"`
// Only set for option elements, indicates if the element has been selected
OptionSelected bool `json:"optionSelected,omitempty"`
// `Node`'s id, corresponds to DOM.Node.backendNodeId.
BackendNodeID int64 `json:"backendNodeId"`
// The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if
// any.
ChildNodeIndexes []int64 `json:"childNodeIndexes,omitempty"`
// Attributes of an `Element` node.
Attributes []NameValue `json:"attributes,omitempty"`
// Indexes of pseudo elements associated with this node in the `domNodes` array returned by
// `getSnapshot`, if any.
PseudoElementIndexes []int64 `json:"pseudoElementIndexes,omitempty"`
// The index of the node's related layout tree node in the `layoutTreeNodes` array returned by
// `getSnapshot`, if any.
LayoutNodeIndex int64 `json:"layoutNodeIndex,omitempty"`
// Document URL that `Document` or `FrameOwner` node points to.
DocumentURL string `json:"documentURL,omitempty"`
// Base URL that `Document` or `FrameOwner` node uses for URL completion.
BaseURL string `json:"baseURL,omitempty"`
// Only set for documents, contains the document's content language.
ContentLanguage string `json:"contentLanguage,omitempty"`
// Only set for documents, contains the document's character set encoding.
DocumentEncoding string `json:"documentEncoding,omitempty"`
// `DocumentType` node's publicId.
PublicID string `json:"publicId,omitempty"`
// `DocumentType` node's systemId.
SystemID string `json:"systemId,omitempty"`
// Frame ID for frame owner elements and also for the document node.
FrameID string `json:"frameId,omitempty"`
// The index of a frame owner element's content document in the `domNodes` array returned by
// `getSnapshot`, if any.
ContentDocumentIndex int64 `json:"contentDocumentIndex,omitempty"`
// Type of a pseudo element node.
PseudoType *dom.PseudoType `json:"pseudoType,omitempty"`
// Shadow root type.
ShadowRootType *dom.ShadowRootType `json:"shadowRootType,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.
IsClickable bool `json:"isClickable,omitempty"`
// Details of the node's event listeners, if any.
EventListeners []domdebugger.EventListener `json:"eventListeners,omitempty"`
// The selected url for nodes with a srcset attribute.
CurrentSourceURL string `json:"currentSourceURL,omitempty"`
// The url of the script (if any) that generates this node.
OriginURL string `json:"originURL,omitempty"`
// Scroll offsets, set when this node is a Document.
ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"`
ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"`
}
DOMNode data type. A Node in the DOM tree.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-DOMNode
type Disable ¶
type Disable struct{}
Disable contains the parameters, and acts as a Go receiver, for the CDP command `disable`.
Disables DOM snapshot agent for the given page.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-disable
func NewDisable ¶
func NewDisable() *Disable
NewDisable constructs a new Disable struct instance, with all (but only) the required parameters. Optional parameters may be added using the builder-like methods below.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-disable
func (*Disable) Do ¶
Do sends the Disable CDP command to a browser, and returns the browser's response.
func (*Disable) ParseResponse ¶
ParseResponse parses the browser's response to the Disable CDP command.
type DocumentSnapshot ¶
type DocumentSnapshot struct {
// Document URL that `Document` or `FrameOwner` node points to.
DocumentURL int64 `json:"documentURL"`
// Document title.
Title int64 `json:"title"`
// Base URL that `Document` or `FrameOwner` node uses for URL completion.
BaseURL int64 `json:"baseURL"`
// Contains the document's content language.
ContentLanguage int64 `json:"contentLanguage"`
// Contains the document's character set encoding.
EncodingName int64 `json:"encodingName"`
// `DocumentType` node's publicId.
PublicID int64 `json:"publicId"`
// `DocumentType` node's systemId.
SystemID int64 `json:"systemId"`
// Frame ID for frame owner elements and also for the document node.
FrameID int64 `json:"frameId"`
// A table with dom nodes.
Nodes NodeTreeSnapshot `json:"nodes"`
// The nodes in the layout tree.
Layout LayoutTreeSnapshot `json:"layout"`
// The post-layout inline text nodes.
TextBoxes TextBoxSnapshot `json:"textBoxes"`
// Horizontal scroll offset.
ScrollOffsetX float64 `json:"scrollOffsetX,omitempty"`
// Vertical scroll offset.
ScrollOffsetY float64 `json:"scrollOffsetY,omitempty"`
// Document content width.
ContentWidth float64 `json:"contentWidth,omitempty"`
// Document content height.
ContentHeight float64 `json:"contentHeight,omitempty"`
}
DocumentSnapshot data type. Document snapshot.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-DocumentSnapshot
type Enable ¶
type Enable struct{}
Enable contains the parameters, and acts as a Go receiver, for the CDP command `enable`.
Enables DOM snapshot agent for the given page.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-enable
func NewEnable ¶
func NewEnable() *Enable
NewEnable constructs a new Enable struct instance, with all (but only) the required parameters. Optional parameters may be added using the builder-like methods below.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-enable
func (*Enable) Do ¶
Do sends the Enable CDP command to a browser, and returns the browser's response.
func (*Enable) ParseResponse ¶
ParseResponse parses the browser's response to the Enable CDP command.
type GetSnapshot ¶
type GetSnapshot struct {
// Whitelist of computed styles to return.
ComputedStyleWhitelist []string `json:"computedStyleWhitelist"`
// Whether or not to retrieve details of DOM listeners (default false).
IncludeEventListeners bool `json:"includeEventListeners,omitempty"`
// Whether to determine and include the paint order index of LayoutTreeNodes (default false).
IncludePaintOrder bool `json:"includePaintOrder,omitempty"`
// Whether to include UA shadow tree in the snapshot (default false).
IncludeUserAgentShadowTree bool `json:"includeUserAgentShadowTree,omitempty"`
}
GetSnapshot contains the parameters, and acts as a Go receiver, for the CDP command `getSnapshot`.
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.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-getSnapshot
This CDP method is deprecated.
func NewGetSnapshot ¶
func NewGetSnapshot(computedStyleWhitelist []string) *GetSnapshot
NewGetSnapshot constructs a new GetSnapshot struct instance, with all (but only) the required parameters. Optional parameters may be added using the builder-like methods below.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#method-getSnapshot
This CDP method is deprecated.
func (*GetSnapshot) Do ¶
func (t *GetSnapshot) Do(ctx context.Context) (*GetSnapshotResult, error)
Do sends the GetSnapshot CDP command to a browser, and returns the browser's response.
func (*GetSnapshot) ParseResponse ¶
func (t *GetSnapshot) ParseResponse(m *devtools.Message) (*GetSnapshotResult, error)
ParseResponse parses the browser's response to the GetSnapshot CDP command.
func (*GetSnapshot) SetIncludeEventListeners ¶
func (t *GetSnapshot) SetIncludeEventListeners(v bool) *GetSnapshot
SetIncludeEventListeners adds or modifies the value of the optional parameter `includeEventListeners` in the GetSnapshot CDP command.
Whether or not to retrieve details of DOM listeners (default false).
func (*GetSnapshot) SetIncludePaintOrder ¶
func (t *GetSnapshot) SetIncludePaintOrder(v bool) *GetSnapshot
SetIncludePaintOrder adds or modifies the value of the optional parameter `includePaintOrder` in the GetSnapshot CDP command.
Whether to determine and include the paint order index of LayoutTreeNodes (default false).
func (*GetSnapshot) SetIncludeUserAgentShadowTree ¶
func (t *GetSnapshot) SetIncludeUserAgentShadowTree(v bool) *GetSnapshot
SetIncludeUserAgentShadowTree adds or modifies the value of the optional parameter `includeUserAgentShadowTree` in the GetSnapshot CDP command.
Whether to include UA shadow tree in the snapshot (default false).
type GetSnapshotResult ¶
type GetSnapshotResult struct {
// The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
DomNodes []DOMNode `json:"domNodes"`
// The nodes in the layout tree.
LayoutTreeNodes []LayoutTreeNode `json:"layoutTreeNodes"`
// Whitelisted ComputedStyle properties for each node in the layout tree.
ComputedStyles []ComputedStyle `json:"computedStyles"`
}
GetSnapshotResult contains the browser's response to calling the GetSnapshot CDP command with Do().
type InlineTextBox ¶
type InlineTextBox struct {
// The bounding box in document coordinates. Note that scroll offset of the document is ignored.
BoundingBox dom.Rect `json:"boundingBox"`
// 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.
StartCharacterIndex int64 `json:"startCharacterIndex"`
// 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.
NumCharacters int64 `json:"numCharacters"`
}
InlineTextBox data type. Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-InlineTextBox
type LayoutTreeNode ¶
type LayoutTreeNode struct {
// The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
DomNodeIndex int64 `json:"domNodeIndex"`
// The bounding box in document coordinates. Note that scroll offset of the document is ignored.
BoundingBox dom.Rect `json:"boundingBox"`
// Contents of the LayoutText, if any.
LayoutText string `json:"layoutText,omitempty"`
// The post-layout inline text nodes, if any.
InlineTextNodes []InlineTextBox `json:"inlineTextNodes,omitempty"`
// Index into the `computedStyles` array returned by `getSnapshot`.
StyleIndex int64 `json:"styleIndex,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.
PaintOrder int64 `json:"paintOrder,omitempty"`
// Set to true to indicate the element begins a new stacking context.
IsStackingContext bool `json:"isStackingContext,omitempty"`
}
LayoutTreeNode data type. Details of an element in the DOM tree with a LayoutObject.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-LayoutTreeNode
type LayoutTreeSnapshot ¶
type LayoutTreeSnapshot struct {
// Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
NodeIndex []int64 `json:"nodeIndex"`
// Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
Styles []ArrayOfStrings `json:"styles"`
// The absolute position bounding box.
Bounds []Rectangle `json:"bounds"`
// Contents of the LayoutText, if any.
Text []int64 `json:"text"`
// Stacking context information.
StackingContexts RareBooleanData `json:"stackingContexts"`
// 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.
PaintOrders []int64 `json:"paintOrders,omitempty"`
// The offset rect of nodes. Only available when includeDOMRects is set to true
OffsetRects []Rectangle `json:"offsetRects,omitempty"`
// The scroll rect of nodes. Only available when includeDOMRects is set to true
ScrollRects []Rectangle `json:"scrollRects,omitempty"`
// The client rect of nodes. Only available when includeDOMRects is set to true
ClientRects []Rectangle `json:"clientRects,omitempty"`
// The list of background colors that are blended with colors of overlapping elements.
//
// This CDP property is experimental.
BlendedBackgroundColors []int64 `json:"blendedBackgroundColors,omitempty"`
// The list of computed text opacities.
//
// This CDP property is experimental.
TextColorOpacities []float64 `json:"textColorOpacities,omitempty"`
}
LayoutTreeSnapshot data type. Table of details of an element in the DOM tree with a LayoutObject.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-LayoutTreeSnapshot
type NameValue ¶
type NameValue struct {
// Attribute/property name.
Name string `json:"name"`
// Attribute/property value.
Value string `json:"value"`
}
NameValue data type. A name/value pair.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-NameValue
type NodeTreeSnapshot ¶
type NodeTreeSnapshot struct {
// Parent node index.
ParentIndex []int64 `json:"parentIndex,omitempty"`
// `Node`'s nodeType.
NodeType []int64 `json:"nodeType,omitempty"`
// Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
ShadowRootType *RareStringData `json:"shadowRootType,omitempty"`
// `Node`'s nodeName.
NodeName []int64 `json:"nodeName,omitempty"`
// `Node`'s nodeValue.
NodeValue []int64 `json:"nodeValue,omitempty"`
// `Node`'s id, corresponds to DOM.Node.backendNodeId.
BackendNodeID []int64 `json:"backendNodeId,omitempty"`
// Attributes of an `Element` node. Flatten name, value pairs.
Attributes []ArrayOfStrings `json:"attributes,omitempty"`
// Only set for textarea elements, contains the text value.
TextValue *RareStringData `json:"textValue,omitempty"`
// Only set for input elements, contains the input's associated text value.
InputValue *RareStringData `json:"inputValue,omitempty"`
// Only set for radio and checkbox input elements, indicates if the element has been checked
InputChecked *RareBooleanData `json:"inputChecked,omitempty"`
// Only set for option elements, indicates if the element has been selected
OptionSelected *RareBooleanData `json:"optionSelected,omitempty"`
// The index of the document in the list of the snapshot documents.
ContentDocumentIndex *RareIntegerData `json:"contentDocumentIndex,omitempty"`
// Type of a pseudo element node.
PseudoType *RareStringData `json:"pseudoType,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.
IsClickable *RareBooleanData `json:"isClickable,omitempty"`
// The selected url for nodes with a srcset attribute.
CurrentSourceURL *RareStringData `json:"currentSourceURL,omitempty"`
// The url of the script (if any) that generates this node.
OriginURL *RareStringData `json:"originURL,omitempty"`
}
NodeTreeSnapshot data type. Table containing nodes.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-NodeTreeSnapshot
type RareBooleanData ¶
type RareBooleanData struct {
Index []int64 `json:"index"`
}
RareBooleanData data type.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-RareBooleanData
type RareIntegerData ¶
RareIntegerData data type.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-RareIntegerData
type RareStringData ¶
RareStringData data type. Data that is only present on rare nodes.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-RareStringData
type Rectangle ¶
type Rectangle []float64
Rectangle data type.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-Rectangle
type StringIndex ¶
type StringIndex int64
StringIndex data type. Index of the string in the strings table.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-StringIndex
type TextBoxSnapshot ¶
type TextBoxSnapshot struct {
// Index of the layout tree node that owns this box collection.
LayoutIndex []int64 `json:"layoutIndex"`
// The absolute position bounding box.
Bounds []Rectangle `json:"bounds"`
// 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.
Start []int64 `json:"start"`
// 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.
Length []int64 `json:"length"`
}
TextBoxSnapshot data type. Table of details of the post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.
https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot/#type-TextBoxSnapshot