Package-level declarations

Types

Link copied to clipboard

Index of the string in the strings table.

Link copied to clipboard
@Serializable
data class CaptureSnapshotRequest(val computedStyles: List<String>, val includePaintOrder: Boolean? = null, val includeDOMRects: Boolean? = null, val includeBlendedBackgroundColors: Boolean? = null, val includeTextColorOpacities: Boolean? = null)

Request object containing input parameters for the DOMSnapshotDomain.captureSnapshot command.

Link copied to clipboard
@Serializable
data class CaptureSnapshotResponse(val documents: List<DocumentSnapshot>, val strings: List<String>)

Response type for the DOMSnapshotDomain.captureSnapshot command.

Link copied to clipboard
@Serializable
data class ComputedStyle(val properties: List<NameValue>)

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

Link copied to clipboard
@Serializable
object DisableResponse

A dummy response object for the DOMSnapshotDomain.disable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class DocumentSnapshot(val documentURL: StringIndex, val title: StringIndex, val baseURL: StringIndex, val contentLanguage: StringIndex, val encodingName: StringIndex, val publicId: StringIndex, val systemId: StringIndex, val frameId: StringIndex, val nodes: NodeTreeSnapshot, val layout: LayoutTreeSnapshot, val textBoxes: TextBoxSnapshot, val scrollOffsetX: Double? = null, val scrollOffsetY: Double? = null, val contentWidth: Double? = null, val contentHeight: Double? = null)

Document snapshot.

Link copied to clipboard
@Serializable
data class DOMNode(val nodeType: Int, val nodeName: String, val nodeValue: String, val textValue: String? = null, val inputValue: String? = null, val inputChecked: Boolean? = null, val optionSelected: Boolean? = null, val backendNodeId: BackendNodeId, val childNodeIndexes: List<Int>? = null, val attributes: List<NameValue>? = null, val pseudoElementIndexes: List<Int>? = null, val layoutNodeIndex: Int? = null, val documentURL: String? = null, val baseURL: String? = null, val contentLanguage: String? = null, val documentEncoding: String? = null, val publicId: String? = null, val systemId: String? = null, val frameId: FrameId? = null, val contentDocumentIndex: Int? = null, val pseudoType: PseudoType? = null, val shadowRootType: ShadowRootType? = null, val isClickable: Boolean? = null, val eventListeners: List<EventListener>? = null, val currentSourceURL: String? = null, val originURL: String? = null, val scrollOffsetX: Double? = null, val scrollOffsetY: Double? = null)

A Node in the DOM tree.

Link copied to clipboard

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

Link copied to clipboard
@Serializable
object EnableResponse

A dummy response object for the DOMSnapshotDomain.enable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class GetSnapshotRequest(val computedStyleWhitelist: List<String>, val includeEventListeners: Boolean? = null, val includePaintOrder: Boolean? = null, val includeUserAgentShadowTree: Boolean? = null)

Request object containing input parameters for the DOMSnapshotDomain.getSnapshot command.

Link copied to clipboard
@Serializable
data class GetSnapshotResponse(val domNodes: List<DOMNode>, val layoutTreeNodes: List<LayoutTreeNode>, val computedStyles: List<ComputedStyle>)

Response type for the DOMSnapshotDomain.getSnapshot command.

Link copied to clipboard
@Serializable
data class InlineTextBox(val boundingBox: Rect, val startCharacterIndex: Int, val numCharacters: Int)

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

Link copied to clipboard
@Serializable
data class LayoutTreeNode(val domNodeIndex: Int, val boundingBox: Rect, val layoutText: String? = null, val inlineTextNodes: List<InlineTextBox>? = null, val styleIndex: Int? = null, val paintOrder: Int? = null, val isStackingContext: Boolean? = null)

Details of an element in the DOM tree with a LayoutObject.

Link copied to clipboard
@Serializable
data class LayoutTreeSnapshot(val nodeIndex: List<Int>, val styles: List<ArrayOfStrings>, val bounds: List<Rectangle>, val text: List<StringIndex>, val stackingContexts: RareBooleanData, val paintOrders: List<Int>? = null, val offsetRects: List<Rectangle>? = null, val scrollRects: List<Rectangle>? = null, val clientRects: List<Rectangle>? = null, val blendedBackgroundColors: List<StringIndex>? = null, val textColorOpacities: List<Double>? = null)

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

Link copied to clipboard
@Serializable
data class NameValue(val name: String, val value: String)

A name/value pair.

Link copied to clipboard
@Serializable
data class NodeTreeSnapshot(val parentIndex: List<Int>? = null, val nodeType: List<Int>? = null, val shadowRootType: RareStringData? = null, val nodeName: List<StringIndex>? = null, val nodeValue: List<StringIndex>? = null, val backendNodeId: List<BackendNodeId>? = null, val attributes: List<ArrayOfStrings>? = null, val textValue: RareStringData? = null, val inputValue: RareStringData? = null, val inputChecked: RareBooleanData? = null, val optionSelected: RareBooleanData? = null, val contentDocumentIndex: RareIntegerData? = null, val pseudoType: RareStringData? = null, val pseudoIdentifier: RareStringData? = null, val isClickable: RareBooleanData? = null, val currentSourceURL: RareStringData? = null, val originURL: RareStringData? = null)

Table containing nodes.

Link copied to clipboard
@Serializable
data class RareBooleanData(val index: List<Int>)

(undocumented in the protocol definition)

Link copied to clipboard
@Serializable
data class RareIntegerData(val index: List<Int>, val value: List<Int>)

(undocumented in the protocol definition)

Link copied to clipboard
@Serializable
data class RareStringData(val index: List<Int>, val value: List<StringIndex>)

Data that is only present on rare nodes.

Link copied to clipboard
typealias Rectangle = List<Double>

(undocumented in the protocol definition)

Link copied to clipboard
typealias StringIndex = Int

Index of the string in the strings table.

Link copied to clipboard
@Serializable
data class TextBoxSnapshot(val layoutIndex: List<Int>, val bounds: List<Rectangle>, val start: List<Int>, val length: List<Int>)

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