Detailed Description

The base for all DOM nodes.

Inheritance diagram for Dom.Node:
Dom.EventTarget Dom.IParentNode Dom.IEventTarget Css.SparkInformerNode Dom.AttributeNode Dom.CharacterData Dom.Document Dom.DocumentFragment Dom.DocumentType Dom.Element Dom.Comment Dom.TextNode Css.ReflowDocument Dom.LangDocument Dom.LangElement Dom.RadioNodeList MathML.MathElement Speech.SpeechElement Svg.SVGElement

Public Member Functions

HtmlElement getByTagName (string tag)
 Casts getElementByTagName to a HtmlElement for you (exists because of SVG and MathML). More...
 
HtmlElement getById (string id)
 Casts getElementById to a HtmlElement for you (exists because of SVG and MathML). More...
 
HtmlElement getByAttribute (string property, string value)
 Casts getElementByAttribute to a HtmlElement for you (exists because of SVG and MathML). More...
 
bool isBefore (Node other)
 True if this element is before the other one in the DOM. More...
 
void insertAfter (Node toInsert, Node after)
 Inserts the given element after the given one. More...
 
Node prependChild (Node child)
 Prepends the given element as a child. More...
 
Node insertBefore (Node toInsert, Node before)
 Inserts the given element before the given one. More...
 
Node replaceChild (Node with, Node element)
 Replaces the given child with another. More...
 
Node appendChild (Node element)
 Adds the given element to the children of this element. More...
 
Node moveChild (Node toMove, int index)
 Moves the given node to the given new index. More...
 
Node removeChildAt (int index)
 Removes the child at the given index from this element. More...
 
Node removeChild (Node element)
 Removes the given child from this element. More...
 
bool hasChildNodes ()
 True if this element has any child nodes. More...
 
virtual bool OnLexerAddNode (HtmlLexer lexer, int mode)
 Called when this node has been created and is being added to the given lexer. Closely related to Element.OnLexerCloseNode. More...
 
virtual Node cloneNode (bool deep)
 Clones this node. More...
 
void normalize ()
 Normalises this node. More...
 
bool isSupported (string feature, string version)
 Is the given feature supported? More...
 
bool hasAttributes ()
 Does this node have any attributes? More...
 
ushort compareDocumentPosition (Node other)
 Compare document position (two elements only here). More...
 
bool isParentOf (Node node)
 True if this is a parent of the given node. More...
 
bool contains (Node node)
 True if the given node is a descendant of this or not. More...
 
string lookupNamespaceURI (string nsUri)
 Looks up a namespace URI, returning the prefix. More...
 
HTMLCollection getElementsByClassName (string className)
 Gets all elements with the given class name(s), seperated by spaces. May include this element or any of it's kids. More...
 
Element getElementByTagNameNS (string namespaceURI, string tag)
 Gets the first child element with the given tag. More...
 
HTMLCollection getElementsByTagNameNS (string namespaceURI, string tag)
 Gets all child elements with the given tag. More...
 
HTMLCollection getElementsByTagNameNS (MLNamespace ns, string tag, bool stopWithOne)
 Gets all child elements with the given tag. More...
 
bool getElementsByTagNameNS (MLNamespace ns, string tag, bool stopWithOne, INodeList results)
 Gets all child elements with the given tag. More...
 
Element getElementByTagName (string tag)
 Gets the first child element with the given tag. More...
 
HTMLCollection getElementsByTagName (string tag)
 Gets all child elements with the given tag. More...
 
HTMLCollection getElementsByTagName (string tag, bool stopWithOne)
 Gets all child elements with the given tag. More...
 
bool getElementsByTagName (string tag, bool stopWithOne, INodeList results)
 Gets all child elements with the given tag. More...
 
Element getElementByName (string name)
 Gets the first child element with the given name. More...
 
HTMLCollection getElementsByName (string name)
 Gets all child elements with the given name. More...
 
HTMLCollection getElementsByName (string name, bool stopWithOne)
 Gets all child elements with the given name. More...
 
bool getElementsByName (string name, bool stopWithOne, INodeList results)
 Gets all child elements with the given name. More...
 
Element getElementById (string value)
 Gets a child element by ID. More...
 
NodeList getElementsByAttribute (string property, string value)
 Gets all elements with the given attribute. May include this element or any of it's kids. More...
 
NodeList getElementsWithProperty (string property, string value)
 Gets all elements with the given attribute. May include this element or any of it's kids. More...
 
void getElementsByAttribute (string property, string value, INodeList results)
 Gets all elements with the given property. May include this element or any of it's kids. More...
 
void getElementsByClassName (string[] classes, INodeList results)
 Gets all elements with the given class name(s). May include this element or any of it's kids. More...
 
Element getElementByAttribute (string property, string value)
 Gets an element with the given attribute. May be this element or any of it's kids. More...
 
bool isSameNode (Node other)
 Tests whether two nodes are the same, that is if they reference the same object More...
 
virtual bool isEqualNode (Node other)
 Tests whether two nodes are the same by attribute comparison. More...
 
bool isDefaultNamespace (string nsUri)
 Tests if this elements default namespace is the same as the given one. More...
 
string lookupPrefix (string prefix)
 Looks up a namespace prefix, returning the namespace URI. More...
 
Node remove ()
 Removes this node from the tree it belongs to. More...
 
virtual void ToString (System.Text.StringBuilder result)
 
override string ToString ()
 
Node insertChild (int index, Node child)
 Inserts a child into this element at the given index. Pushes any elements at the given index over. More...
 
Node replaceWith (Node element)
 Replaces this element with the given element. More...
 
virtual bool OnAttributeChange (string attribute)
 Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded. More...
 
- Public Member Functions inherited from Dom.EventTarget
void ClearEvents ()
 Clears all events on this document. More...
 
bool dispatchEvent (Event e)
 Runs an event of the given name. More...
 
void addEventListener (string name, EventListener listener)
 Adds an event listener to this document. More...
 
void addEventListener (string name, EventListener listener, bool useCapture)
 Adds an event listener to this document. More...
 
void removeEventListener (string name, object evtHandlerInternal)
 Removes an event listener from this document. More...
 
void addEventListener (string name, AnimationEventDelegate method)
 
void addEventListener (string name, AudioProcessingEventDelegate method)
 
void addEventListener (string name, BeforeInputEventDelegate method)
 
void addEventListener (string name, BeforeUnloadEventDelegate method)
 
void addEventListener (string name, BlobEventDelegate method)
 
void addEventListener (string name, ClipboardEventDelegate method)
 
void addEventListener (string name, CloseEventDelegate method)
 
void addEventListener (string name, CompositionEventDelegate method)
 
void addEventListener (string name, CustomEventDelegate method)
 
void addEventListener (string name, CSSFontFaceLoadEventDelegate method)
 
void addEventListener (string name, DeviceLightEventDelegate method)
 
void addEventListener (string name, DeviceMotionEventDelegate method)
 
void addEventListener (string name, DeviceOrientationEventDelegate method)
 
void addEventListener (string name, DeviceProximityEventDelegate method)
 
void addEventListener (string name, DomEventDelegate method)
 
void addEventListener (string name, DOMTransactionEventDelegate method)
 
void addEventListener (string name, DragEventDelegate method)
 
void addEventListener (string name, EditingBeforeInputEventDelegate method)
 
void addEventListener (string name, ErrorEventDelegate method)
 
void addEventListener (string name, FetchEventDelegate method)
 
void addEventListener (string name, FocusEventDelegate method)
 
void addEventListener (string name, GamepadEventDelegate method)
 
void addEventListener (string name, HashChangeEventDelegate method)
 
void addEventListener (string name, IDBVersionChangeEventDelegate method)
 
void addEventListener (string name, InputEventDelegate method)
 
void addEventListener (string name, KeyboardEventDelegate method)
 
void addEventListener (string name, MediaStreamEventDelegate method)
 
void addEventListener (string name, MessageEventDelegate method)
 
void addEventListener (string name, MouseEventDelegate method)
 
void addEventListener (string name, MutationEventDelegate method)
 
void addEventListener (string name, OfflineAudioCompletionEventDelegate method)
 
void addEventListener (string name, PageTransitionEventDelegate method)
 
void addEventListener (string name, PointerEventDelegate method)
 
void addEventListener (string name, PopStateEventDelegate method)
 
void addEventListener (string name, ProgressEventDelegate method)
 
void addEventListener (string name, RelatedEventDelegate method)
 
void addEventListener (string name, RTCDataChannelEventDelegate method)
 
void addEventListener (string name, RTCIdentityErrorEventDelegate method)
 
void addEventListener (string name, RTCIdentityEventDelegate method)
 
void addEventListener (string name, RTCPeerConnectionIceEventDelegate method)
 
void addEventListener (string name, SensorEventDelegate method)
 
void addEventListener (string name, StorageEventDelegate method)
 
void addEventListener (string name, TextEventDelegate method)
 
void addEventListener (string name, TimeEventDelegate method)
 
void addEventListener (string name, TouchEventDelegate method)
 
void addEventListener (string name, TrackEventDelegate method)
 
void addEventListener (string name, TransitionEventDelegate method)
 
void addEventListener (string name, UIEventDelegate method)
 
void addEventListener (string name, UserProximityEventDelegate method)
 
void addEventListener (string name, WebGLContextEventDelegate method)
 
void addEventListener (string name, WheelEventDelegate method)
 
void addEventListener (string name, Nitro.DynamicMethod< Nitro.Void > listener)
 
void addEventListener (string name, Nitro.DynamicMethod< Nitro.Void > listener, bool capture)
 
void addEventListener (string name, ContextEventDelegate method)
 
void addEventListener (string name, SlideEventDelegate method)
 
void addEventListener (string name, PowerUI.SpriteEventDelegate method)
 
void addEventListener (string name, SVGEventDelegate method)
 Adds an event listener to this document. More...
 
void addEventListener (string name, SVGZoomEventDelegate method)
 

Static Public Member Functions

static bool PropertiesEqual (Dictionary< string, string > a, Dictionary< string, string > b)
 True if two args sets are equal. More...
 

Public Attributes

MLNamespace Namespace
 The namespace this node belongs to. More...
 
Dictionary< string, string > Properties =new Dictionary<string,string>()
 The set of attributes on this tag. An attribute is e.g. style="display:none;". More...
 
const ushort ELEMENT_NODE =1
 
const ushort ATTRIBUTE_NODE =2
 
const ushort TEXT_NODE =3
 
const ushort CDATA_SECTION_NODE =4
 
const ushort ENTITY_REFERENCE_NODE =5
 
const ushort ENTITY_NODE =6
 
const ushort PROCESSING_INSTRUCTION_NODE =7
 
const ushort COMMENT_NODE =8
 
const ushort DOCUMENT_NODE =9
 
const ushort DOCUMENT_TYPE_NODE =10
 
const ushort DOCUMENT_FRAGMENT_NODE =11
 
const ushort DOCUMENT_NOTATION_NODE =12
 
const ushort DOCUMENT_POSITION_DISCONNECTED =1
 
const ushort DOCUMENT_POSITION_PRECEDING =2
 
const ushort DOCUMENT_POSITION_FOLLOWING =4
 
const ushort DOCUMENT_POSITION_CONTAINS =8
 
const ushort DOCUMENT_POSITION_CONTAINED_BY =16
 
const ushort DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC =32
 
- Public Attributes inherited from Dom.EventTarget
EventsSet Events
 A set of events for this document. See addEventListener. More...
 

Package Functions

void empty ()
 Clears the child node set such that they no longer have a parent. More...
 
virtual void ResetVariable (string name)
 Reloads the content of variables if it's name matches the given one. More...
 
virtual void ResetAllVariables ()
 Re-resolves all variable tags. This is used when the language is changed. More...
 
virtual void RemovedFromDOM ()
 Internal. Called when this element has been removed from the DOM. More...
 
virtual void AddedToDOM ()
 Internal. Called when this element has been added to the DOM. More...
 
virtual void ChangedDOM ()
 Called when this elements child nodes change. Doesn't occur when AddedToDOM or RemovedFromDOM trigger. More...
 

Package Attributes

Document document_
 The document that this node belongs to. More...
 
Node parentNode_
 The parent node. More...
 
NodeList childNodes_
 The kids of this node. This can be null. More...
 

Properties

HtmlElement htmlParentNode [get]
 The parent as a HtmlElement (convenience method). More...
 
HtmlDocument htmlDocument [get]
 The ownerDocument as a Html document. More...
 
string this[string property] [get, set]
 Gets or sets the named attribute of this tag. An attribute is e.g. style="display:none;". More...
 
virtual bool ClearBackground [get]
 True if this node should clear the background state of the renderer. The background state essentially declares if this nodes background-color or background-image represents the viewports background. In HTML, both the body tag and root html tag can represent the background, so the root HTML node doesn't clear the state to allow body to set it if needed. So, only the root html element overrides this (and this is better than checking for .Tag=="html"). More...
 
override EventTarget eventTargetParentNode [get]
 The parent node as used by EventTarget during capture. Can be null. More...
 
Document document [get]
 The document that this node belongs to. More...
 
virtual string nodeName [get]
 The name for this type of node. More...
 
virtual string nodeValue [get, set]
 The value of this node. More...
 
virtual ushort nodeType [get]
 The type of element that this is. More...
 
Node firstChild [get]
 The first child of this element. More...
 
Node lastChild [get]
 The last child of this element. More...
 
Node previousSibling [get]
 The sibling before this one under this elements parent. Null if this is the first child. More...
 
Node nextSibling [get]
 The sibling following this one under this elements parent. Null if this is the last child. More...
 
Element previousElementSibling [get]
 The next non-text node sibling. More...
 
Element nextElementSibling [get]
 The next non-text node sibling. More...
 
virtual Document ownerDocument [get]
 The owner document. More...
 
virtual string localName [get]
 The local name of this node. More...
 
virtual string baseURI [get]
 The base URI. More...
 
string namespaceURI [get]
 The namespace this node is in. More...
 
string innerText [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
bool isRooted [get]
 True if this element is in any document and is rooted. More...
 
string outerText [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
virtual string textContent [get, set]
 Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally. More...
 
Element parentElement [get]
 Gets the parent html element of this element. More...
 
string prefix [get]
 The prefix (namespace). More...
 
Node rootNode [get]
 The root node. More...
 
NodeList childNodes [get]
 The set of children of this element. More...
 
HTMLCollection children [get]
 The set of children elements. More...
 
int sameNameIndex [get]
 Gets the index of this element in it's parents childNodes in terms of child elements that have the same name (tag) as this one. More...
 
int childIndex [get]
 Gets the index of this element in it's parents childNodes. More...
 
int childElementCount [get]
 The number of child elements of this element. More...
 
int childCount [get]
 The number of children of this element. More...
 
Element firstElementChild [get]
 The first non-text child of this element. More...
 
Element lastElementChild [get]
 The last non-text child of this element. More...
 
string id [get, set]
 The ID of this element. Won't ever be null. More...
 
string className [get, set]
 The css class attribute of this element. Won't ever be null. Note that it can potentially hold multiple names, e.g. "red button". Use classList for those. More...
 
Node parentNode [get]
 This nodes parent node. More...
 
DOMTokenList classList [get]
 The set of class names. More...
 
- Properties inherited from Dom.EventTarget
static DispatchStack dispatchStackRef [get]
 The active dispatch stack. Use event.deepPath to access it (available during dispatch only). More...
 
virtual EventTarget eventTargetParentNode [get]
 The parent node as used by EventTarget during capture. Can be null. More...
 
virtual NodeList eventTargetChildren [get]
 The childNode set as used by EventTarget during capture. Can be null. More...
 
- Properties inherited from Dom.IParentNode
NodeList childNodes [get]
 The kids of this node. More...
 
Node parentNode [get]
 The parent node. More...
 
Element parentElement [get]
 The parent element. More...
 
int childCount [get]
 The number of kids of this node. More...
 
int childElementCount [get]
 The number of child elements of this parent. More...
 
HTMLCollection children [get]
 The kids of this node. More...
 
Element firstElementChild [get]
 The first element child of this node. More...
 
Element lastElementChild [get]
 The last element child of this node. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dom.EventTarget
GetFirstDelegate< T > (string name)
 Gets the first delegate event handler for the given event name. More...
 
virtual bool HandleLocalEvent (Event e, bool bubblePhase)
 Handles triggering event handlers here. Elements can (and in PowerUI's case, do) override this. PowerUI overrides it to handle e.g. onclick="" attributes too. More...
 
- Static Package Attributes inherited from Dom.EventTarget
static DispatchStack PooledStack
 The current head of the pooled dispatched stacks. More...
 

Member Function Documentation

virtual void Dom.Node.AddedToDOM ( )
inlinepackagevirtual

Internal. Called when this element has been added to the DOM.

Reimplemented in MathML.MathElement.

Node Dom.Node.appendChild ( Node  element)
inline

Adds the given element to the children of this element.

Parameters
elementThe child element to add.
virtual void Dom.Node.ChangedDOM ( )
inlinepackagevirtual

Called when this elements child nodes change. Doesn't occur when AddedToDOM or RemovedFromDOM trigger.

Reimplemented in MathML.MathElement.

virtual Node Dom.Node.cloneNode ( bool  deep)
inlinevirtual

Clones this node.

Reimplemented in Dom.Element, and Dom.CharacterData.

ushort Dom.Node.compareDocumentPosition ( Node  other)
inline

Compare document position (two elements only here).

bool Dom.Node.contains ( Node  node)
inline

True if the given node is a descendant of this or not.

void Dom.Node.empty ( )
inlinepackage

Clears the child node set such that they no longer have a parent.

HtmlElement Dom.Node.getByAttribute ( string  property,
string  value 
)
inline

Casts getElementByAttribute to a HtmlElement for you (exists because of SVG and MathML).

HtmlElement Dom.Node.getById ( string  id)
inline

Casts getElementById to a HtmlElement for you (exists because of SVG and MathML).

HtmlElement Dom.Node.getByTagName ( string  tag)
inline

Casts getElementByTagName to a HtmlElement for you (exists because of SVG and MathML).

Element Dom.Node.getElementByAttribute ( string  property,
string  value 
)
inline

Gets an element with the given attribute. May be this element or any of it's kids.

Parameters
propertyThe name of the attribute to find. E.g. "id".
valueOptional. The value that the attribute should be; null for any value.
Returns
The first element found that matches.
Element Dom.Node.getElementById ( string  value)
inline

Gets a child element by ID.

Element Dom.Node.getElementByName ( string  name)
inline

Gets the first child element with the given name.

Parameters
nameThe name to look for.
Returns
The first child with the name.
Element Dom.Node.getElementByTagName ( string  tag)
inline

Gets the first child element with the given tag.

Parameters
tagThe html tag to look for.
Returns
The first child with the tag.
Element Dom.Node.getElementByTagNameNS ( string  namespaceURI,
string  tag 
)
inline

Gets the first child element with the given tag.

Parameters
tagThe html tag to look for.
Returns
The first child with the tag.
NodeList Dom.Node.getElementsByAttribute ( string  property,
string  value 
)
inline

Gets all elements with the given attribute. May include this element or any of it's kids.

Parameters
propertyThe name of the attribute to find. E.g. "id".
valueOptional. The value that the attribute should be; null for any value.
Returns
A list of all matches.
void Dom.Node.getElementsByAttribute ( string  property,
string  value,
INodeList  results 
)
inline

Gets all elements with the given property. May include this element or any of it's kids.

Parameters
propertyThe name of the property to find. E.g. "id".
valueOptional. The value that the property should be; null for any value.
resultsThe set of elements to add results to.
HTMLCollection Dom.Node.getElementsByClassName ( string  className)
inline

Gets all elements with the given class name(s), seperated by spaces. May include this element or any of it's kids.

Parameters
classNameThe name of the classes to find. E.g. "red box".
Returns
A list of all matches.
void Dom.Node.getElementsByClassName ( string[]  classes,
INodeList  results 
)
inline

Gets all elements with the given class name(s). May include this element or any of it's kids.

Parameters
classesThe name of the classes to find. No duplicates allowed.
resultsThe set into which the results are placed.
HTMLCollection Dom.Node.getElementsByName ( string  name)
inline

Gets all child elements with the given name.

Parameters
nameThe name to look for.
Returns
The set of all tags with this name.
HTMLCollection Dom.Node.getElementsByName ( string  name,
bool  stopWithOne 
)
inline

Gets all child elements with the given name.

Parameters
nameThe name to look for.
stopWithOneTrue if the search should stop when one is found.
Returns
The set of all tags with this name.
bool Dom.Node.getElementsByName ( string  name,
bool  stopWithOne,
INodeList  results 
)
inline

Gets all child elements with the given name.

Parameters
nameThe name to look for.
Returns
The set of all tags with this name.
HTMLCollection Dom.Node.getElementsByTagName ( string  tag)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
Returns
The set of all tags with this tag.
HTMLCollection Dom.Node.getElementsByTagName ( string  tag,
bool  stopWithOne 
)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
stopWithOneTrue if the search should stop when one is found.
Returns
The set of all tags with this tag.
bool Dom.Node.getElementsByTagName ( string  tag,
bool  stopWithOne,
INodeList  results 
)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
Returns
The set of all tags with this tag.
HTMLCollection Dom.Node.getElementsByTagNameNS ( string  namespaceURI,
string  tag 
)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
Returns
The set of all tags with this tag.
HTMLCollection Dom.Node.getElementsByTagNameNS ( MLNamespace  ns,
string  tag,
bool  stopWithOne 
)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
stopWithOneTrue if the search should stop when one is found.
Returns
The set of all tags with this tag.
bool Dom.Node.getElementsByTagNameNS ( MLNamespace  ns,
string  tag,
bool  stopWithOne,
INodeList  results 
)
inline

Gets all child elements with the given tag.

Parameters
tagThe html tag to look for.
Returns
The set of all tags with this tag.
NodeList Dom.Node.getElementsWithProperty ( string  property,
string  value 
)
inline

Gets all elements with the given attribute. May include this element or any of it's kids.

Parameters
attributeThe name of the attribute to find. E.g. "id".
valueOptional. The value that the attribute should be; null for any value.
Returns
A list of all matches.
bool Dom.Node.hasAttributes ( )
inline

Does this node have any attributes?

bool Dom.Node.hasChildNodes ( )
inline

True if this element has any child nodes.

void Dom.Node.insertAfter ( Node  toInsert,
Node  after 
)
inline

Inserts the given element after the given one.

Node Dom.Node.insertBefore ( Node  toInsert,
Node  before 
)
inline

Inserts the given element before the given one.

Node Dom.Node.insertChild ( int  index,
Node  child 
)
inline

Inserts a child into this element at the given index. Pushes any elements at the given index over.

bool Dom.Node.isBefore ( Node  other)
inline

True if this element is before the other one in the DOM.

bool Dom.Node.isDefaultNamespace ( string  nsUri)
inline

Tests if this elements default namespace is the same as the given one.

virtual bool Dom.Node.isEqualNode ( Node  other)
inlinevirtual

Tests whether two nodes are the same by attribute comparison.

Reimplemented in Dom.Element, Dom.TextNode, Dom.Document, Dom.DocumentType, Dom.AttributeNode, Dom.DocumentFragment, and Dom.Comment.

bool Dom.Node.isParentOf ( Node  node)
inline

True if this is a parent of the given node.

bool Dom.Node.isSameNode ( Node  other)
inline

Tests whether two nodes are the same, that is if they reference the same object

bool Dom.Node.isSupported ( string  feature,
string  version 
)
inline

Is the given feature supported?

string Dom.Node.lookupNamespaceURI ( string  nsUri)
inline

Looks up a namespace URI, returning the prefix.

string Dom.Node.lookupPrefix ( string  prefix)
inline

Looks up a namespace prefix, returning the namespace URI.

Node Dom.Node.moveChild ( Node  toMove,
int  index 
)
inline

Moves the given node to the given new index.

void Dom.Node.normalize ( )
inline

Normalises this node.

virtual bool Dom.Node.OnLexerAddNode ( HtmlLexer  lexer,
int  mode 
)
inlinevirtual

Called when this node has been created and is being added to the given lexer. Closely related to Element.OnLexerCloseNode.

Returns
True if this element handled itself.

Reimplemented in Dom.TextNode, Dom.DocumentType, Dom.Comment, and Dom.LangVarElement.

Node Dom.Node.prependChild ( Node  child)
inline

Prepends the given element as a child.

static bool Dom.Node.PropertiesEqual ( Dictionary< string, string >  a,
Dictionary< string, string >  b 
)
inlinestatic

True if two args sets are equal.

Node Dom.Node.remove ( )
inline

Removes this node from the tree it belongs to.

Node Dom.Node.removeChild ( Node  element)
inline

Removes the given child from this element.

Parameters
elementThe child element to remove.
Node Dom.Node.removeChildAt ( int  index)
inline

Removes the child at the given index from this element.

Parameters
elementThe child element to remove.
virtual void Dom.Node.RemovedFromDOM ( )
inlinepackagevirtual

Internal. Called when this element has been removed from the DOM.

Reimplemented in MathML.MathElement, and PowerUI.RenderableTextNode.

Node Dom.Node.replaceChild ( Node  with,
Node  element 
)
inline

Replaces the given child with another.

Node Dom.Node.replaceWith ( Node  element)
inline

Replaces this element with the given element.

virtual void Dom.Node.ResetAllVariables ( )
inlinepackagevirtual

Re-resolves all variable tags. This is used when the language is changed.

virtual void Dom.Node.ResetVariable ( string  name)
inlinepackagevirtual

Reloads the content of variables if it's name matches the given one.

Parameters
nameThe name of the variable to reset.
virtual void Dom.Node.ToString ( System.Text.StringBuilder  result)
inlinevirtual
override string Dom.Node.ToString ( )
inline

Member Data Documentation

const ushort Dom.Node.ATTRIBUTE_NODE =2
const ushort Dom.Node.CDATA_SECTION_NODE =4
NodeList Dom.Node.childNodes_
package

The kids of this node. This can be null.

const ushort Dom.Node.COMMENT_NODE =8
Document Dom.Node.document_
package

The document that this node belongs to.

const ushort Dom.Node.DOCUMENT_FRAGMENT_NODE =11
const ushort Dom.Node.DOCUMENT_NODE =9
const ushort Dom.Node.DOCUMENT_NOTATION_NODE =12
const ushort Dom.Node.DOCUMENT_POSITION_CONTAINED_BY =16
const ushort Dom.Node.DOCUMENT_POSITION_CONTAINS =8
const ushort Dom.Node.DOCUMENT_POSITION_DISCONNECTED =1
const ushort Dom.Node.DOCUMENT_POSITION_FOLLOWING =4
const ushort Dom.Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC =32
const ushort Dom.Node.DOCUMENT_POSITION_PRECEDING =2
const ushort Dom.Node.DOCUMENT_TYPE_NODE =10
const ushort Dom.Node.ELEMENT_NODE =1
const ushort Dom.Node.ENTITY_NODE =6
const ushort Dom.Node.ENTITY_REFERENCE_NODE =5
MLNamespace Dom.Node.Namespace

The namespace this node belongs to.

Node Dom.Node.parentNode_
package

The parent node.

const ushort Dom.Node.PROCESSING_INSTRUCTION_NODE =7
Dictionary<string,string> Dom.Node.Properties =new Dictionary<string,string>()

The set of attributes on this tag. An attribute is e.g. style="display:none;".

const ushort Dom.Node.TEXT_NODE =3

Property Documentation

virtual string Dom.Node.baseURI
get

The base URI.

int Dom.Node.childCount
get

The number of children of this element.

int Dom.Node.childElementCount
get

The number of child elements of this element.

int Dom.Node.childIndex
get

Gets the index of this element in it's parents childNodes.

NodeList Dom.Node.childNodes
get

The set of children of this element.

HTMLCollection Dom.Node.children
get

The set of children elements.

DOMTokenList Dom.Node.classList
get

The set of class names.

string Dom.Node.className
getset

The css class attribute of this element. Won't ever be null. Note that it can potentially hold multiple names, e.g. "red button". Use classList for those.

virtual bool Dom.Node.ClearBackground
getpackage

True if this node should clear the background state of the renderer. The background state essentially declares if this nodes background-color or background-image represents the viewports background. In HTML, both the body tag and root html tag can represent the background, so the root HTML node doesn't clear the state to allow body to set it if needed. So, only the root html element overrides this (and this is better than checking for .Tag=="html").

Document Dom.Node.document
get

The document that this node belongs to.

override EventTarget Dom.Node.eventTargetParentNode
getpackage

The parent node as used by EventTarget during capture. Can be null.

Node Dom.Node.firstChild
get

The first child of this element.

Element Dom.Node.firstElementChild
get

The first non-text child of this element.

HtmlDocument Dom.Node.htmlDocument
get

The ownerDocument as a Html document.

HtmlElement Dom.Node.htmlParentNode
get

The parent as a HtmlElement (convenience method).

string Dom.Node.id
getset

The ID of this element. Won't ever be null.

string Dom.Node.innerText
getset

Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally.

bool Dom.Node.isRooted
get

True if this element is in any document and is rooted.

Node Dom.Node.lastChild
get

The last child of this element.

Element Dom.Node.lastElementChild
get

The last non-text child of this element.

virtual string Dom.Node.localName
get

The local name of this node.

string Dom.Node.namespaceURI
get

The namespace this node is in.

Element Dom.Node.nextElementSibling
get

The next non-text node sibling.

Node Dom.Node.nextSibling
get

The sibling following this one under this elements parent. Null if this is the last child.

virtual string Dom.Node.nodeName
get

The name for this type of node.

virtual ushort Dom.Node.nodeType
get

The type of element that this is.

virtual string Dom.Node.nodeValue
getset

The value of this node.

string Dom.Node.outerText
getset

Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally.

virtual Document Dom.Node.ownerDocument
get

The owner document.

Element Dom.Node.parentElement
get

Gets the parent html element of this element.

Node Dom.Node.parentNode
get

This nodes parent node.

string Dom.Node.prefix
get

The prefix (namespace).

Element Dom.Node.previousElementSibling
get

The next non-text node sibling.

Node Dom.Node.previousSibling
get

The sibling before this one under this elements parent. Null if this is the first child.

Node Dom.Node.rootNode
get

The root node.

int Dom.Node.sameNameIndex
get

Gets the index of this element in it's parents childNodes in terms of child elements that have the same name (tag) as this one.

virtual string Dom.Node.textContent
getset

Gets or sets the text content of this element (i.e. the content without any html.). Setting this is good for preventing any html injection as it will be taken literally.

string Dom.Node.this[string property]
getset

Gets or sets the named attribute of this tag. An attribute is e.g. style="display:none;".

Parameters
propertyThe name of the attribute to get/set.