struct Protocol::DOMSnapshot::DOMNode

Overview

A Node in the DOM tree.

Included Modules

Defined in:

protocol/dom_snapshot.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def attributes : Array(NameValue) | Nil #

Attributes of an Element node.


[View source]
def backend_node_id : DOM::BackendNodeId #

Node's id, corresponds to DOM.Node.backendNodeId.


[View source]
def base_url : String | Nil #

Base URL that Document or FrameOwner node uses for URL completion.


[View source]
def child_node_indexes : Array(Int::Primitive) | Nil #

The indexes of the node's child nodes in the domNodes array returned by getSnapshot, if any.


[View source]
def content_document_index : Int::Primitive | Nil #

The index of a frame owner element's content document in the domNodes array returned by getSnapshot, if any.


[View source]
def content_language : String | Nil #

Only set for documents, contains the document's content language.


[View source]
def current_source_url : String | Nil #

The selected url for nodes with a srcset attribute.


[View source]
def document_encoding : String | Nil #

Only set for documents, contains the document's character set encoding.


[View source]
def document_url : String | Nil #

Document URL that Document or FrameOwner node points to.


[View source]
def event_listeners : Array(DOMDebugger::EventListener) | Nil #

Details of the node's event listeners, if any.


[View source]
def frame_id : Page::FrameId | Nil #

Frame ID for frame owner elements and also for the document node.


[View source]
def input_checked : Bool | Nil #

Only set for radio and checkbox input elements, indicates if the element has been checked


[View source]
def input_value : String | Nil #

Only set for input elements, contains the input's associated text value.


[View source]
def is_clickable : Bool | Nil #

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.


[View source]
def layout_node_index : Int::Primitive | Nil #

The index of the node's related layout tree node in the layoutTreeNodes array returned by getSnapshot, if any.


[View source]
def node_name : String #

Node's nodeName.


[View source]
def node_type : Int::Primitive #

Node's nodeType.


[View source]
def node_value : String #

Node's nodeValue.


[View source]
def option_selected : Bool | Nil #

Only set for option elements, indicates if the element has been selected


[View source]
def origin_url : String | Nil #

The url of the script (if any) that generates this node.


[View source]
def pseudo_element_indexes : Array(Int::Primitive) | Nil #

Indexes of pseudo elements associated with this node in the domNodes array returned by getSnapshot, if any.


[View source]
def pseudo_type : DOM::PseudoType | Nil #

Type of a pseudo element node.


[View source]
def public_id : String | Nil #

DocumentType node's publicId.


[View source]
def scroll_offset_x : Number::Primitive | Nil #

Scroll offsets, set when this node is a Document.


[View source]
def scroll_offset_y : Number::Primitive | Nil #

[View source]
def shadow_root_type : DOM::ShadowRootType | Nil #

Shadow root type.


[View source]
def system_id : String | Nil #

DocumentType node's systemId.


[View source]
def text_value : String | Nil #

Only set for textarea elements, contains the text value.


[View source]