class Protocol::DOM::Node

Overview

DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

Included Modules

Defined in:

protocol/dom.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def assigned_slot : BackendNode | Nil #

[View source]
def attributes : Array(String) | Nil #

Attributes of the Element node in the form of flat array [name1, value1, name2, value2].


[View source]
def backend_node_id : BackendNodeId #

The BackendNodeId for this node.


[View source]
def base_url : String | Nil #

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


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

Child count for Container nodes.


[View source]
def children : Array(Node) | Nil #

Child nodes of this node when requested with children.


[View source]
def compatibility_mode : CompatibilityMode | Nil #

[View source]
def content_document : Node | Nil #

Content document for frame owner elements.


[View source]
def distributed_nodes : Array(BackendNode) | Nil #

Distributed nodes for given insertion point.


[View source]
def document_url : String | Nil #

Document URL that Document or FrameOwner node points to.


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

Frame ID for frame owner elements.


[View source]
def imported_document : Node | Nil #

Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.


[View source]
def internal_subset : String | Nil #

DocumentType's internalSubset.


[View source]
def is_svg : Bool | Nil #

Whether the node is SVG.


[View source]
def local_name : String #

Node's localName.


[View source]
def name : String | Nil #

Attr's name.


[View source]
def node_id : 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.


[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 parent_id : NodeId | Nil #

The id of the parent node if any.


[View source]
def pseudo_elements : Array(Node) | Nil #

Pseudo elements associated with this node.


[View source]
def pseudo_identifier : String | Nil #

Pseudo element identifier for this node. Only present if there is a valid pseudoType.


[View source]
def pseudo_type : PseudoType | Nil #

Pseudo element type for this node.


[View source]
def public_id : String | Nil #

DocumentType's publicId.


[View source]
def shadow_root_type : ShadowRootType | Nil #

Shadow root type.


[View source]
def shadow_roots : Array(Node) | Nil #

Shadow root list for given element host.


[View source]
def system_id : String | Nil #

DocumentType's systemId.


[View source]
def template_content : Node | Nil #

Content document fragment for template elements.


[View source]
def value : String | Nil #

Attr's value.


[View source]
def xml_version : String | Nil #

Document's XML version in case of XML documents.


[View source]