Package Torello.Browser.BrowserAPI
Class DOMSnapshot.DOMNode
- java.lang.Object
-
- Torello.Browser.BaseType<DOMSnapshot.DOMNode>
-
- Torello.Browser.BrowserAPI.DOMSnapshot.DOMNode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BaseType<?>>
- Enclosing class:
- DOMSnapshot
public static class DOMSnapshot.DOMNode extends BaseType<DOMSnapshot.DOMNode> implements java.io.Serializable
This Nested Java Class is declared as a "Type", which is similar to a Java Class. The CDP API Specifications list this type among the types, events & commands located in theDOMSnapshotdomain, which may be found within theBrowserAPI.
📌 All browser domain type classes will have a class name that begins with an upper case letter.A Node in the DOM tree.- See Also:
- Serialized Form
Hi-Lited Source-Code:This File's Source Code:
- View Here: Torello/Browser/BrowserAPI/DOMSnapshot.java
- Open New Browser-Tab: Torello/Browser/BrowserAPI/DOMSnapshot.java
File Size: 9,353 Bytes Line Count: 240 '\n' Characters Found
Helper: Equals, HashCode, toJSON, etc
- View Here: DOMSnapshot$$DOMNode$$.java
- Open New Browser-Tab: DOMSnapshot$$DOMNode$$.java
File Size: 26,360 Bytes Line Count: 582 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field Description protected static longserialVersionUIDType Fields / Properties (from Google & Browser Specs) Modifier and Type Field Description DOMSnapshot.NameValue[]attributesAttributes of anElementnode.intbackendNodeIdNode's id, corresponds to DOM.Node.backendNodeId.StringbaseURLBase URL thatDocumentorFrameOwnernode uses for URL completion.int[]childNodeIndexesThe indexes of the node's child nodes in thedomNodesarray returned bygetSnapshot, if any.IntegercontentDocumentIndexThe index of a frame owner element's content document in thedomNodesarray returned bygetSnapshot, if any.StringcontentLanguageOnly set for documents, contains the document's content language.StringcurrentSourceURLThe selected url for nodes with a srcset attribute.StringdocumentEncodingOnly set for documents, contains the document's character set encoding.StringdocumentURLDocument URL thatDocumentorFrameOwnernode points to.DOMDebugger.EventListener[]eventListenersDetails of the node's event listeners, if any.StringframeIdFrame ID for frame owner elements and also for the document node.BooleaninputCheckedOnly set for radio and checkbox input elements, indicates if the element has been checkedStringinputValueOnly set for input elements, contains the input's associated text value.BooleanisClickableWhether this DOM node responds to mouse clicks.IntegerlayoutNodeIndexThe index of the node's related layout tree node in thelayoutTreeNodesarray returned bygetSnapshot, if any.StringnodeNameNode's nodeName.intnodeTypeNode's nodeType.StringnodeValueNode's nodeValue.BooleanoptionSelectedOnly set for option elements, indicates if the element has been selectedStringoriginURLThe url of the script (if any) that generates this node.int[]pseudoElementIndexesIndexes of pseudo elements associated with this node in thedomNodesarray returned bygetSnapshot, if any.StringpseudoTypeType of a pseudo element node.StringpublicIdDocumentTypenode's publicId.NumberscrollOffsetXScroll offsets, set when this node is a Document.NumberscrollOffsetY[No Description Provided by Google]StringshadowRootTypeShadow root type.StringsystemIdDocumentTypenode's systemId.StringtextValueOnly set for textarea elements, contains the text value.
-
Constructor Summary
Constructors Constructor Description DOMNode(ReadOnlyList<Boolean> isPresent, int nodeType, String nodeName, String nodeValue, String textValue, String inputValue, Boolean inputChecked, Boolean optionSelected, int backendNodeId, int[] childNodeIndexes, DOMSnapshot.NameValue[] attributes, int[] pseudoElementIndexes, Integer layoutNodeIndex, String documentURL, String baseURL, String contentLanguage, String documentEncoding, String publicId, String systemId, String frameId, Integer contentDocumentIndex, String pseudoType, String shadowRootType, Boolean isClickable, DOMDebugger.EventListener[] eventListeners, String currentSourceURL, String originURL, Number scrollOffsetX, Number scrollOffsetY)Constructor.
-
Method Summary
Static Builder Convert a JsonObject to a POJO Modifier and Type Method Description static DOMSnapshot.DOMNodefromJSON(JsonObject jo)Creates an instance of this class from aJsonObject.Retrieve the Type-Descriptor Singleton-Instance for this Nested Class. Modifier and Type Method Description static NestedDescriptor<DOMSnapshot.DOMNode>descriptor()Returns this class'sNestedDescriptorsingleton-instance.-
Methods inherited from class Torello.Browser.BaseType
allEnumStrROLs, compareTo, enumStrList, enumStrValidate, enumStrValidateThrow, equals, hashCode, isPresent, optionalsValidate, optionalsValidateThrow, toJSON, toString
-
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- See Also:
- Constant Field Values
-
nodeType
public final int nodeType
Node's nodeType.
-
nodeName
public final java.lang.String nodeName
Node's nodeName.
-
nodeValue
public final java.lang.String nodeValue
Node's nodeValue.
-
textValue
public final java.lang.String textValue
Only set for textarea elements, contains the text value.
OPTIONAL
-
inputValue
public final java.lang.String inputValue
Only set for input elements, contains the input's associated text value.
OPTIONAL
-
inputChecked
public final java.lang.Boolean inputChecked
Only set for radio and checkbox input elements, indicates if the element has been checked
OPTIONAL
-
optionSelected
public final java.lang.Boolean optionSelected
Only set for option elements, indicates if the element has been selected
OPTIONAL
-
backendNodeId
public final int backendNodeId
Node's id, corresponds to DOM.Node.backendNodeId.
-
childNodeIndexes
public final int[] childNodeIndexes
The indexes of the node's child nodes in thedomNodesarray returned bygetSnapshot, if any.
OPTIONAL
-
attributes
public final DOMSnapshot.NameValue[] attributes
Attributes of anElementnode.
OPTIONAL
-
pseudoElementIndexes
public final int[] pseudoElementIndexes
Indexes of pseudo elements associated with this node in thedomNodesarray returned bygetSnapshot, if any.
OPTIONAL
-
layoutNodeIndex
public final java.lang.Integer layoutNodeIndex
The index of the node's related layout tree node in thelayoutTreeNodesarray returned bygetSnapshot, if any.
OPTIONAL
-
documentURL
public final java.lang.String documentURL
Document URL thatDocumentorFrameOwnernode points to.
OPTIONAL
-
baseURL
public final java.lang.String baseURL
Base URL thatDocumentorFrameOwnernode uses for URL completion.
OPTIONAL
-
contentLanguage
public final java.lang.String contentLanguage
Only set for documents, contains the document's content language.
OPTIONAL
-
documentEncoding
public final java.lang.String documentEncoding
Only set for documents, contains the document's character set encoding.
OPTIONAL
-
publicId
public final java.lang.String publicId
DocumentTypenode's publicId.
OPTIONAL
-
systemId
public final java.lang.String systemId
DocumentTypenode's systemId.
OPTIONAL
-
frameId
public final java.lang.String frameId
Frame ID for frame owner elements and also for the document node.
OPTIONAL
-
contentDocumentIndex
public final java.lang.Integer contentDocumentIndex
The index of a frame owner element's content document in thedomNodesarray returned bygetSnapshot, if any.
OPTIONAL
-
pseudoType
public final java.lang.String pseudoType
Type of a pseudo element node.
OPTIONALThis particular field will have its values resricted to the contents of a CDP defined Enumerated String List. That list may be viewed here:
📎DOM.PseudoType
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = DOM.PseudoType.enumStrList("pseudoType"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
shadowRootType
public final java.lang.String shadowRootType
Shadow root type.
OPTIONALThis particular field will have its values resricted to the contents of a CDP defined Enumerated String List. That list may be viewed here:
📎DOM.ShadowRootType
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = DOM.ShadowRootType.enumStrList("shadowRootType"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
isClickable
public final java.lang.Boolean isClickable
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.
OPTIONAL
-
eventListeners
public final DOMDebugger.EventListener[] eventListeners
Details of the node's event listeners, if any.
OPTIONAL
-
currentSourceURL
public final java.lang.String currentSourceURL
The selected url for nodes with a srcset attribute.
OPTIONAL
-
originURL
public final java.lang.String originURL
The url of the script (if any) that generates this node.
OPTIONAL
-
scrollOffsetX
public final java.lang.Number scrollOffsetX
Scroll offsets, set when this node is a Document.
OPTIONAL
-
scrollOffsetY
public final java.lang.Number scrollOffsetY
[No Description Provided by Google]
OPTIONAL
-
-
Constructor Detail
-
DOMNode
public DOMNode(ReadOnlyList<java.lang.Boolean> isPresent, int nodeType, java.lang.String nodeName, java.lang.String nodeValue, java.lang.String textValue, java.lang.String inputValue, java.lang.Boolean inputChecked, java.lang.Boolean optionSelected, int backendNodeId, int[] childNodeIndexes, DOMSnapshot.NameValue[] attributes, int[] pseudoElementIndexes, java.lang.Integer layoutNodeIndex, java.lang.String documentURL, java.lang.String baseURL, java.lang.String contentLanguage, java.lang.String documentEncoding, java.lang.String publicId, java.lang.String systemId, java.lang.String frameId, java.lang.Integer contentDocumentIndex, java.lang.String pseudoType, java.lang.String shadowRootType, java.lang.Boolean isClickable, DOMDebugger.EventListener[] eventListeners, java.lang.String currentSourceURL, java.lang.String originURL, java.lang.Number scrollOffsetX, java.lang.Number scrollOffsetY)
Constructor. Please review this class' fields for documentation.
-
-
Method Detail
-
fromJSON
public static DOMSnapshot.DOMNode fromJSON(JsonObject jo)
Creates an instance of this class from aJsonObject.- Code:
- Exact Method Body:
return singleton.fromJSON(jo);
-
descriptor
public static NestedDescriptor<DOMSnapshot.DOMNode> descriptor()
Returns this class'sNestedDescriptorsingleton-instance. class / type.- Code:
- Exact Method Body:
return singleton.descriptor();
-
-