|
List< DOMNode > | GetElementsByTagName (string tagName) |
| Returns a list of DOM nodes with specific tagName . More...
|
|
List< DOMNode > | GetElementsByName (string name) |
| Returns a list of DOM nodes whose name attribute is given by name . More...
|
|
List< DOMNode > | GetElementsByClassName (string className) |
| Returns a list of DOM nodes whose class attribute is given by className . More...
|
|
void | Click () |
| Simulates click on the current Node. More...
|
|
DOMNode | QuerySelector (string selectors) |
| Returns the first DOM node from children of the current node, that match any selector within selectors string. More...
|
|
List< DOMNode > | QuerySelectorAll (string selectors) |
| Returns a list of DOM nodes from children of the current node, that match any selector within selectors string. More...
|
|
bool | InsertChild (DOMNode node, DOMNode beforeNode) |
| Inserts a new node before an existing beforeNode. The new node could be an existing node in the document, or you can create and insert a new node. If the node is existing node, it will be moved to new location in the document. More...
|
|
bool | ReplaceChild (DOMNode newNode, DOMNode oldNode) |
| Replaces existing child node with a new node. The new node could be an existing node in the document, or you can create a new node. If the newNode is existing node, it will be moved to new location in the document. The old node could be used for inserting/appending it into the document later. More...
|
|
bool | RemoveChild (DOMNode childNode) |
| Removes a child node and notifies whether child node was removed from the current node successfully or not. More...
|
|
bool | AppendChild (DOMNode childNode) |
| Appends a node as the last child of the current node. The new node could be an existing node in the document, or you can create a new node. If the childNode is existing node, it will be moved to new location in the document. More...
|
|
void | AddEventListener (DOMEventType eventType, DOMEventHandler handler, bool useCapture) |
| This method allows the registration of event listeners on the event target. If an DOMEventHandler is added to an DOMEventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
If multiple identical DOMEventHandlers are registered on the same DOMEventTarget with the same parameters the duplicate instances are discarded. They do not cause the DOMEventHandler to be called twice and since they are discarded they do not need to be removed with the RemoveEventListener method. More...
|
|
void | AddEventListener (DOMEvent domEvent, DOMEventHandler handler, bool useCapture) |
| This method allows the registration of event listeners on the event target. If an DOMEventHandler is added to an DOMEventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase.
If multiple identical DOMEventHandlers are registered on the same DOMEventTarget with the same parameters the duplicate instances are discarded. They do not cause the DOMEventHandler to be called twice and since they are discarded they do not need to be removed with the RemoveEventListener method. More...
|
|
void | RemoveEventListener (DOMEventType eventType, DOMEventHandler handler, bool useCapture) |
| This method allows the removal of event listeners from the event target. If an DOMEventHandler is removed from an DOMEventTarget while it is processing an event, it will not be triggered by the current actions. DOMEventHandlers can never be invoked after being removed.
Calling RemoveEventListener with arguments which do not identify any currently registered DOMEventHandler on the DOMEventTarget has no effect. More...
|
|
void | RemoveEventListener (DOMEvent domEvent, DOMEventHandler handler, bool useCapture) |
| This method allows the removal of event listeners from the event target. If an DOMEventHandler is removed from an DOMEventTarget while it is processing an event, it will not be triggered by the current actions. DOMEventHandlers can never be invoked after being removed.
Calling RemoveEventListener with arguments which do not identify any currently registered DOMEventHandler on the DOMEventTarget has no effect. More...
|
|
List< DOMEventHandler > | GetEventListeners (DOMEventType eventType) |
| Returns a list of registered DOMEventHandler's for specific eventType. More...
|
|
List< DOMEventHandler > | GetEventListeners (DOMEvent domEvent) |
| Returns a list of registered DOMEventHandler's for specific custom event. More...
|
|
bool | DispatchEvent (DOMEvent domEvent) |
| Sends an event to the current element. More...
|
|
DOMElement | GetElementByTagName (string tagName) |
| Finds first DOM element in the current document or element with the given tagName . Returns null if element wasn't found using given find method. More...
|
|
DOMElement | GetElementByName (string name) |
| Finds first DOM element in the current document or element with the given name . Returns null if element wasn't found using given find method. More...
|
|
DOMElement | GetElementByClassName (string className) |
| Finds first DOM element in the current document or element with the given className . Returns null if element wasn't found using given find method. More...
|
|
XPathResult | Evaluate (string expression) |
| Evaluates an XPath expression for the document element with XPathResultType.ANY_TYPE and returns the result. Equivalent of: More...
|
|
XPathResult | Evaluate (string expression, XPathResultType type) |
| Returns an XPathResult based on an XPath expression and other given parameters. More...
|
|
Represents a singe HTML DOM node in the document tree. All JxBrowser DOM objects implement the DOMNode interface.
string DotNetBrowser.DOM.DOMNode.TextContent |
|
getset |
Gets or sets text content of the node and its descendants.
Setting this property on a node removes all of its children and replaces them with a single text node with the given value.
This method returns null if the element is a document, a document type, or a notation. To grab all of the text and CDATA data for the whole document.
If the node is a CDATA section, a comment, a processing instruction, or a text node, this method returns the text inside this node (the NodeValue ).
For other node types, this method returns the concatenation of the TextContent attribute value of every child node, excluding comments and processing instruction nodes. This is an empty string if the node has no children.
Differences from InnerText
-
Note that while TextContent gets the content of all elements, including <script> and <style> elements, the mostly equivalent innerText property, does not.
-
InnerText is also aware of style and will not return the text of hidden elements, whereas TextContent will.
-
As InnerText is aware of CSS styling, it will trigger a reflow, whereas TextContent will not.
- Exceptions
-
ArgumentException | when value set null. |