Detailed Description

This object represents any Markup Language (ML) tag such as html, sml, xml etc.

These are the "Global Event Handlers".

Handles various standard attribute DOM functions.

Handles various standard attribute DOM functions. This is an extended set which is likely to be unused, but is here for compliance.

Inheritance diagram for Dom.Element:
Dom.Node Dom.EventTarget Dom.IParentNode Dom.IEventTarget Dom.LangElement Dom.RadioNodeList MathML.MathElement Speech.SpeechElement Svg.SVGElement Dom.LangLanguageElement Dom.LangVarElement MathML.MathActionElement MathML.MathAnnotationElement MathML.MathAnnotationXmlElement MathML.MathEncloseElement MathML.MathErrorElement MathML.MathFencedElement MathML.MathFractionElement MathML.MathGlyphElement MathML.MathIdentifierElement MathML.MathLabelledTrElement MathML.MathMathElement MathML.MathMultiScriptsElement MathML.MathNElement MathML.MathOElement MathML.MathOverElement MathML.MathPaddedElement MathML.MathPhantomElement MathML.MathRootElement MathML.MathRowElement MathML.MathSElement MathML.MathSemanticsElement MathML.MathSpaceElement MathML.MathSqrtElement MathML.MathStyleElement MathML.MathSubElement MathML.MathTableElement MathML.MathTdElement MathML.MathTextElement MathML.MathTrElement MathML.MathUnderElement MathML.MathUnderOverElement Speech.SpeechSpeakElement Svg.SVGClipPathElement Svg.SVGDefsElement Svg.SVGDescElement Svg.SVGFilterElement Svg.SVGFilterPrimitiveStandardAttributes Svg.SVGFontElement Svg.SVGFontFaceElement Svg.SVGFontFaceSrcElement Svg.SVGFontFaceUriElement Svg.SVGForeignObjectElement Svg.SVGGElement Svg.SVGGlyphElement Svg.SVGGraphicsElement Svg.SVGKernElement Svg.SVGMaskElement Svg.SVGMetadataElement Svg.SVGStopElement Svg.SVGSVGElement Svg.SVGSwitchElement Svg.SVGSymbolElement Svg.SVGTitleElement Svg.SVGUseElement

Public Member Functions

virtual void OnChildrenLoaded ()
 Called when this elements children are fully loaded. More...
 
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 
Element GetParentByTagName (string tag)
 Gets a parent element by tag name. More...
 
virtual bool OnDrag (PowerUI.DragEvent e)
 Called repeatedly when this element is being dragged. More...
 
virtual int SetLexerMode (bool last, HtmlLexer lexer)
 When the given lexer resets, this is called. More...
 
override Node cloneNode (bool deep)
 Clones this node. More...
 
virtual bool OnLexerCloseNode (HtmlLexer lexer, int mode)
 Called when a close tag of this element has been created and is being added to the given lexer. Note that this method must not use 'this'. It is most often called as if it was a static method. It's not a static method so it can use inheritence and, as a result, be easily used on the element objects on the current open element stack. More...
 
void before (Node node)
 Inserts a node before this element. More...
 
void after (Node node)
 Inserts an element after this element. More...
 
void before (string html)
 Inserts html before this element. More...
 
void after (string html)
 Inserts html after this element. More...
 
override string ToString ()
 
void insertAdjacentHTML (string positionName, string html)
 Inserts HTML at the given position name. More...
 
void appendTextContent (string text)
 Appends the given literal text to the content of this element. This is good for preventing html injection as the text will be taken literally. More...
 
void append (string html)
 Appends the given html text to the content of this element. More...
 
void append (Element child)
 Appends the given child element to the content of this element. More...
 
void appendInnerHTML (string text)
 Appends the given html text to the content of this element. More...
 
void insertInnerHTML (int index, string text)
 Inserts HTML into this element at the given index. Pushes any elements at the given index over. More...
 
void prepend (Element child)
 Prepends the given child element to the content of this element, adding it as the first child. More...
 
void prepend (string text)
 Prepends the given html text to the content of this element, adding it as the first child. More...
 
void prependInnerHTML (string text)
 Prepends the given html text to the content of this element, adding it as the first child. More...
 
override bool isEqualNode (Node other)
 Tests whether two nodes are the same by attribute comparison. More...
 
void GetPropertyString (System.Text.StringBuilder result)
 A string built from the properties only. More...
 
override void ToString (System.Text.StringBuilder result)
 Gets a string representation of this element. More...
 
bool isChild (Node childElement)
 Checks if the given element is a child of this element. More...
 
void AddToAttributeLookups ()
 Adds this element to all fast lookups. More...
 
void AddToAttributeLookup (string attrib, AttributeLookup lookup)
 Adds this element to the given attribute lookup. More...
 
AttributeNode getAttributeNodeNS (string ns, string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
void setAttributeNodeNS (AttributeNode node)
 Set the named attribute. element[name] is generally better. More...
 
AttributeNode getAttributeNode (string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttributeNode (AttributeNode node)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttributeNode (AttributeNode node)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttributeNode (AttributeNode node)
 Remove the named attribute. element[name] is generally better. More...
 
string getAttributeNS (string ns, string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttributeNS (string ns, string name)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttributeNS (string ns, string name, string value)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttributeNS (string ns, string name)
 Remove the named attribute. element[name] is generally better. More...
 
string getAttribute (string name)
 Get the value of an attribute by name. Generally element[name] is better. More...
 
bool hasAttribute (string name)
 Does this element have the named attribute? element[name] is generally better. More...
 
void setAttribute (string name, string value)
 Set the named attribute. element[name] is generally better. More...
 
void removeAttribute (string name)
 Remove the named attribute. element[name] is generally better. More...
 
void cue ()
 Cues the element to advance any paused PowerSlide slides. More...
 
bool matches (string selectorText)
 True if this element matches the given selector. More...
 
- Public Member Functions inherited from Dom.Node
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...
 
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...
 
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...
 
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)
 

Public Attributes

string Tag
 The raw tag as a string. e.g. "div","span" etc in html. More...
 
Node ParentNode
 Internal use only. The parent of this element. Use PowerUI.HtmlElement.parentNode instead. More...
 
bool IsRebuildingChildren
 This is true if the childNodes are being rebuilt. True for a tiny amount of time, but prevents collisions with the renderer thread. More...
 
- Public Attributes inherited from Dom.Node
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

bool GetBoolAttribute (string name)
 Gets an attribute as a boolean value. More...
 
void SetBoolAttribute (string name, bool value)
 Sets an attribute as a boolean value. More...
 
- Package Functions inherited from Dom.Node
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

bool SelfClosing
 True if this tag closes itself and doesn't need an end ("/div" for example) tag. More...
 
- Package Attributes inherited from Dom.Node
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

virtual bool IsSelfClosing [get]
 True if this element is 'self closing' - i.e. the end tag can be omitted. More...
 
virtual bool NonStandard [get]
 True if this property is non-standard. More...
 
virtual float DragStartDistance [get]
 The minimum distance this element must be dragged in order to trigger a drag start event. More...
 
virtual bool OkToBeOpenAfterBody [get]
 True if this element is ok to be open when /body shows up. html is one example. More...
 
virtual bool IsSpecial [get]
 True if this element has special parsing rules. http://w3c.github.io/html/syntax.html#special More...
 
virtual bool IsParserScope [get]
 True if this element indicates being 'in scope'. http://w3c.github.io/html/syntax.html#in-scope More...
 
virtual bool IsTableRowContext [get]
 True if this element is a table row context. More...
 
virtual bool IsTableBodyContext [get]
 True if this element is a table body context. More...
 
virtual bool IsTableContext [get]
 True if this element is a table context. More...
 
virtual bool IsTableStructure [get]
 True if this element is part of table structure, except for td. More...
 
virtual ImplicitEndMode ImplicitEndAllowed [get]
 The mode used for an implicit end (see http://w3c.github.io/html/syntax.html#generate-implied-end-tags). More...
 
override string textContent [get, set]
 
string outerHTML [get, set]
 The html of this element including the element itself. More...
 
virtual string innerHTML [get, set]
 Gets or sets the innerHTML of this element. More...
 
virtual bool Internal [get]
 True if this tag is for internal use only. More...
 
string PropertyString [get]
 A string built from the properties only. More...
 
override string nodeName [get]
 The name for this type of node. More...
 
string tagName [get]
 The lowercase tag name. More...
 
override string localName [get]
 The local name of this node. More...
 
override ushort nodeType [get]
 The type of element that this is. More...
 
KeyboardEventDelegate onkeyup [get, set]
 Called when this element receives a keyup. More...
 
KeyboardEventDelegate onkeydown [get, set]
 Called when this element receives a keydown. More...
 
MouseEventDelegate onmouseup [get, set]
 Called when this element receives a mouseup. More...
 
MouseEventDelegate onmouseout [get, set]
 Called when this element receives a mouseout. More...
 
MouseEventDelegate onmousedown [get, set]
 Called when this element receives a mousedown. More...
 
MouseEventDelegate onmousemove [get, set]
 Called when this element receives a mousemove. Note that it must be focused. More...
 
MouseEventDelegate onmouseover [get, set]
 Called when this element receives a mouseover. More...
 
FormEventDelegate onreset [get, set]
 Called when a form is reset. More...
 
FormEventDelegate onsubmit [get, set]
 Called when a form is submitted. More...
 
UIEventDelegate onload [get, set]
 Called when this element receives a load event (e.g. iframe). More...
 
FocusEventDelegate onfocus [get, set]
 Called when this element gets focused. More...
 
FocusEventDelegate onfocusin [get, set]
 Called just before this element is focused. More...
 
FocusEventDelegate onfocusout [get, set]
 Called just before this element is blurred. More...
 
FocusEventDelegate onblur [get, set]
 Called when this element is unfocused (blurred). More...
 
MouseEventDelegate onclick [get, set]
 Called when this element receives a full click. More...
 
DomEventDelegate onchange [get, set]
 Used by e.g. input, select etc. Called when its value changes. More...
 
ContextMenus.ContextEventDelegate oncontextmenu [get, set]
 Called when this element receives a contextmenu request. More...
 
virtual Css.ElementStyle style [get]
 This elements style. More...
 
- Properties inherited from Dom.Node
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

- Static Public Member Functions inherited from Dom.Node
static bool PropertiesEqual (Dictionary< string, string > a, Dictionary< string, string > b)
 True if two args sets are equal. More...
 
- 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

void Dom.Element.AddToAttributeLookup ( string  attrib,
AttributeLookup  lookup 
)
inline

Adds this element to the given attribute lookup.

void Dom.Element.AddToAttributeLookups ( )
inline

Adds this element to all fast lookups.

void Dom.Element.after ( Node  node)
inline

Inserts an element after this element.

void Dom.Element.after ( string  html)
inline

Inserts html after this element.

void Dom.Element.append ( string  html)
inline

Appends the given html text to the content of this element.

Parameters
textThe html text to append.
void Dom.Element.append ( Element  child)
inline

Appends the given child element to the content of this element.

Parameters
childThe child to append.
void Dom.Element.appendInnerHTML ( string  text)
inline

Appends the given html text to the content of this element.

Parameters
textThe html text to append.
void Dom.Element.appendTextContent ( string  text)
inline

Appends the given literal text to the content of this element. This is good for preventing html injection as the text will be taken literally.

Parameters
textThe literal text to append.
void Dom.Element.before ( Node  node)
inline

Inserts a node before this element.

void Dom.Element.before ( string  html)
inline

Inserts html before this element.

override Node Dom.Element.cloneNode ( bool  deep)
inlinevirtual

Clones this node.

Reimplemented from Dom.Node.

void Dom.Element.cue ( )
inline

Cues the element to advance any paused PowerSlide slides.

string Dom.Element.getAttribute ( string  name)
inline

Get the value of an attribute by name. Generally element[name] is better.

AttributeNode Dom.Element.getAttributeNode ( string  name)
inline

Get the value of an attribute by name. Generally element[name] is better.

AttributeNode Dom.Element.getAttributeNodeNS ( string  ns,
string  name 
)
inline

Get the value of an attribute by name. Generally element[name] is better.

string Dom.Element.getAttributeNS ( string  ns,
string  name 
)
inline

Get the value of an attribute by name. Generally element[name] is better.

bool Dom.Element.GetBoolAttribute ( string  name)
inlinepackage

Gets an attribute as a boolean value.

Element Dom.Element.GetParentByTagName ( string  tag)
inline

Gets a parent element by tag name.

void Dom.Element.GetPropertyString ( System.Text.StringBuilder  result)
inline

A string built from the properties only.

bool Dom.Element.hasAttribute ( string  name)
inline

Does this element have the named attribute? element[name] is generally better.

bool Dom.Element.hasAttributeNode ( AttributeNode  node)
inline

Does this element have the named attribute? element[name] is generally better.

bool Dom.Element.hasAttributeNS ( string  ns,
string  name 
)
inline

Does this element have the named attribute? element[name] is generally better.

void Dom.Element.insertAdjacentHTML ( string  positionName,
string  html 
)
inline

Inserts HTML at the given position name.

void Dom.Element.insertInnerHTML ( int  index,
string  text 
)
inline

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

bool Dom.Element.isChild ( Node  childElement)
inline

Checks if the given element is a child of this element.

Parameters
childElementThe element to check if it's a child of this or not.
Returns
True if the given element is actually a child of this.
override bool Dom.Element.isEqualNode ( Node  other)
inlinevirtual

Tests whether two nodes are the same by attribute comparison.

Reimplemented from Dom.Node.

bool Dom.Element.matches ( string  selectorText)
inline

True if this element matches the given selector.

virtual void Dom.Element.OnChildrenLoaded ( )
inlinevirtual

Called when this elements children are fully loaded.

Reimplemented in Svg.SVGGlyphElement, Dom.LangVarElement, and Svg.SVGDescElement.

virtual bool Dom.Element.OnDrag ( PowerUI.DragEvent  e)
inlinevirtual

Called repeatedly when this element is being dragged.

virtual bool Dom.Element.OnLexerCloseNode ( HtmlLexer  lexer,
int  mode 
)
inlinevirtual

Called when a close tag of this element has been created and is being added to the given lexer. Note that this method must not use 'this'. It is most often called as if it was a static method. It's not a static method so it can use inheritence and, as a result, be easily used on the element objects on the current open element stack.

Returns
True if this element handled itself.
virtual void Dom.Element.OnTagLoaded ( )
inlinevirtual

Called when the tag is instanced and the element plus its attributes and kids have been fully parsed.

Reimplemented in Dom.LangLanguageElement.

void Dom.Element.prepend ( Element  child)
inline

Prepends the given child element to the content of this element, adding it as the first child.

Parameters
childThe child to prepend.
void Dom.Element.prepend ( string  text)
inline

Prepends the given html text to the content of this element, adding it as the first child.

Parameters
textThe html text to prepend.
void Dom.Element.prependInnerHTML ( string  text)
inline

Prepends the given html text to the content of this element, adding it as the first child.

Parameters
textThe html text to prepend.
void Dom.Element.removeAttribute ( string  name)
inline

Remove the named attribute. element[name] is generally better.

void Dom.Element.removeAttributeNode ( AttributeNode  node)
inline

Remove the named attribute. element[name] is generally better.

void Dom.Element.removeAttributeNS ( string  ns,
string  name 
)
inline

Remove the named attribute. element[name] is generally better.

void Dom.Element.setAttribute ( string  name,
string  value 
)
inline

Set the named attribute. element[name] is generally better.

void Dom.Element.setAttributeNode ( AttributeNode  node)
inline

Set the named attribute. element[name] is generally better.

void Dom.Element.setAttributeNodeNS ( AttributeNode  node)
inline

Set the named attribute. element[name] is generally better.

void Dom.Element.setAttributeNS ( string  ns,
string  name,
string  value 
)
inline

Set the named attribute. element[name] is generally better.

void Dom.Element.SetBoolAttribute ( string  name,
bool  value 
)
inlinepackage

Sets an attribute as a boolean value.

virtual int Dom.Element.SetLexerMode ( bool  last,
HtmlLexer  lexer 
)
inlinevirtual

When the given lexer resets, this is called.

override string Dom.Element.ToString ( )
inline
override void Dom.Element.ToString ( System.Text.StringBuilder  result)
inlinevirtual

Gets a string representation of this element.

Reimplemented from Dom.Node.

Member Data Documentation

bool Dom.Element.IsRebuildingChildren

This is true if the childNodes are being rebuilt. True for a tiny amount of time, but prevents collisions with the renderer thread.

Node Dom.Element.ParentNode

Internal use only. The parent of this element. Use PowerUI.HtmlElement.parentNode instead.

bool Dom.Element.SelfClosing
package

True if this tag closes itself and doesn't need an end ("/div" for example) tag.

string Dom.Element.Tag

The raw tag as a string. e.g. "div","span" etc in html.

Property Documentation

virtual float Dom.Element.DragStartDistance
get

The minimum distance this element must be dragged in order to trigger a drag start event.

Returns
If this returns 0, it means use the default value (Input.MinimumDragStartDistance).
virtual ImplicitEndMode Dom.Element.ImplicitEndAllowed
get

The mode used for an implicit end (see http://w3c.github.io/html/syntax.html#generate-implied-end-tags).

virtual string Dom.Element.innerHTML
getset

Gets or sets the innerHTML of this element.

virtual bool Dom.Element.Internal
get

True if this tag is for internal use only.

virtual bool Dom.Element.IsParserScope
get

True if this element indicates being 'in scope'. http://w3c.github.io/html/syntax.html#in-scope

virtual bool Dom.Element.IsSelfClosing
get

True if this element is 'self closing' - i.e. the end tag can be omitted.

virtual bool Dom.Element.IsSpecial
get

True if this element has special parsing rules. http://w3c.github.io/html/syntax.html#special

virtual bool Dom.Element.IsTableBodyContext
get

True if this element is a table body context.

virtual bool Dom.Element.IsTableContext
get

True if this element is a table context.

virtual bool Dom.Element.IsTableRowContext
get

True if this element is a table row context.

virtual bool Dom.Element.IsTableStructure
get

True if this element is part of table structure, except for td.

override string Dom.Element.localName
get

The local name of this node.

override string Dom.Element.nodeName
get

The name for this type of node.

override ushort Dom.Element.nodeType
get

The type of element that this is.

virtual bool Dom.Element.NonStandard
get

True if this property is non-standard.

virtual bool Dom.Element.OkToBeOpenAfterBody
get

True if this element is ok to be open when /body shows up. html is one example.

FocusEventDelegate Dom.Element.onblur
getset

Called when this element is unfocused (blurred).

DomEventDelegate Dom.Element.onchange
getset

Used by e.g. input, select etc. Called when its value changes.

MouseEventDelegate Dom.Element.onclick
getset

Called when this element receives a full click.

ContextMenus.ContextEventDelegate Dom.Element.oncontextmenu
getset

Called when this element receives a contextmenu request.

FocusEventDelegate Dom.Element.onfocus
getset

Called when this element gets focused.

FocusEventDelegate Dom.Element.onfocusin
getset

Called just before this element is focused.

FocusEventDelegate Dom.Element.onfocusout
getset

Called just before this element is blurred.

KeyboardEventDelegate Dom.Element.onkeydown
getset

Called when this element receives a keydown.

KeyboardEventDelegate Dom.Element.onkeyup
getset

Called when this element receives a keyup.

UIEventDelegate Dom.Element.onload
getset

Called when this element receives a load event (e.g. iframe).

MouseEventDelegate Dom.Element.onmousedown
getset

Called when this element receives a mousedown.

MouseEventDelegate Dom.Element.onmousemove
getset

Called when this element receives a mousemove. Note that it must be focused.

MouseEventDelegate Dom.Element.onmouseout
getset

Called when this element receives a mouseout.

MouseEventDelegate Dom.Element.onmouseover
getset

Called when this element receives a mouseover.

MouseEventDelegate Dom.Element.onmouseup
getset

Called when this element receives a mouseup.

FormEventDelegate Dom.Element.onreset
getset

Called when a form is reset.

FormEventDelegate Dom.Element.onsubmit
getset

Called when a form is submitted.

string Dom.Element.outerHTML
getset

The html of this element including the element itself.

string Dom.Element.PropertyString
get

A string built from the properties only.

virtual Css.ElementStyle Dom.Element.style
get

This elements style.

string Dom.Element.tagName
get

The lowercase tag name.

override string Dom.Element.textContent
getset