Element

extern class js.html.Elementextends NodeAvailable in js

This chapter provides a brief reference for the general methods, properties, and events available to most HTML and XML elements in the Gecko DOM.

Various W3C specifications apply to elements:

The articles listed here span the above and include links to the appropriate W3C DOM specification.

While these interfaces are generally shared by most HTML and XML elements, there are more specialized interfaces for particular objects listed in the DOM HTML Specification. Note, however, that these HTML interfaces are "only for [HTML 4.01] and [XHTML 1.0] documents and are not guaranteed to work with any future version of XHTML." The HTML 5 draft does state it aims for backwards compatibility with these HTML interfaces but says of them that "some features that were formerly deprecated, poorly supported, rarely used or considered unnecessary have been removed." One can avoid the potential conflict by moving entirely to DOM XML attribute methods such as getAttribute().

Html , Head , Link , Title , Meta , Base , IsIndex , Style , Body , Form , Select , OptGroup , Option, Input , TextArea , Button , Label , FieldSet , Legend , UList , OList , DList , Directory , Menu , LI , Div , Paragraph , Heading , Quote , Pre , BR , BaseFont , Font , HR , Mod , Anchor , Image , Object , Param , Applet , Map , Area , Script , Table , TableCaption , TableCol , TableSection , TableRow , TableCell , FrameSet , Frame , IFrame



Documentation for this class was provided by MDN.
var accessKey : String var childElementCount(default,null) : IntThe number of child nodes that are elements. var children(default,null) : HTMLCollectionA live nsIDOMNodeList of the current child elements. var classList(default,null) : DOMTokenListToken list of class attribute var className : StringGets/sets the class of the element. var clientHeight(default,null) : IntThe inner height of an element. var clientLeft(default,null) : IntThe width of the left border of an element. var clientTop(default,null) : IntThe width of the top border of an element. var clientWidth(default,null) : IntThe inner width of an element. var contentEditable : StringGets/sets whether or not the element is editable. Setter throws DOMException. var dataset(default,null) : DOMStringMapAllows access to read and write custom data attributes on the element. var dir : StringGets/sets the directionality of the element. var draggable : Bool var dropzone : String var firstElementChild(default,null) : ElementThe first direct child element of an element, or null if the element has no child elements. var hidden : Bool var id : StringGets/sets the id of the element. var innerHTML : StringGets/sets the markup of the element's content. Setter throws DOMException. var innerText : StringSetter throws DOMException. var isContentEditable(default,null) : BoolIndicates whether or not the content of the element can be edited. Read only. var lang : StringGets/sets the language of an element's attributes, text, and element contents. var lastElementChild(default,null) : ElementThe last direct child element of an element, or null if the element has no child elements. var nextElementSibling(default,null) : ElementThe element immediately following the given one in the tree, or null if there's no sibling node. var offsetHeight(default,null) : IntThe height of an element, relative to the layout. var offsetLeft(default,null) : IntThe distance from this element's left border to its offsetParent's left border. var offsetParent(default,null) : ElementThe element from which all offset calculations are currently computed. var offsetTop(default,null) : IntThe distance from this element's top border to its offsetParent's top border. var offsetWidth(default,null) : IntThe width of an element, relative to the layout. var onabort : EventListener var onbeforecopy : EventListener var onbeforecut : EventListener var onbeforepaste : EventListener var onblur : EventListenerReturns the event handling code for the blur event. var onchange : EventListenerReturns the event handling code for the change event. var onclick : EventListenerReturns the event handling code for the click event. var oncontextmenu : EventListenerReturns the event handling code for the contextmenu event. var oncopy : EventListenerReturns the event handling code for the copy event. var oncut : EventListenerReturns the event handling code for the cut event. var ondblclick : EventListenerReturns the event handling code for the dblclick event. var ondrag : EventListener var ondragend : EventListener var ondragenter : EventListener var ondragleave : EventListener var ondragover : EventListener var ondragstart : EventListener var ondrop : EventListener var onerror : EventListener var onfocus : EventListenerReturns the event handling code for the focus event. var onfullscreenchange : EventListener var onfullscreenerror : EventListener var oninput : EventListener var oninvalid : EventListener var onkeydown : EventListenerReturns the event handling code for the keydown event. var onkeypress : EventListenerReturns the event handling code for the keypress event. var onkeyup : EventListenerReturns the event handling code for the keyup event. var onload : EventListener var onmousedown : EventListenerReturns the event handling code for the mousedown event. var onmousemove : EventListenerReturns the event handling code for the mousemove event. var onmouseout : EventListenerReturns the event handling code for the mouseout event. var onmouseover : EventListenerReturns the event handling code for the mouseover event. var onmouseup : EventListenerReturns the event handling code for the mouseup event. var onmousewheel : EventListener var onpaste : EventListenerReturns the event handling code for the paste event. var onreset : EventListener var onscroll : EventListenerReturns the event handling code for the scroll event. var onsearch : EventListener var onselect : EventListener var onselectstart : EventListener var onsubmit : EventListener var ontouchcancel : EventListener var ontouchend : EventListener var ontouchmove : EventListener var ontouchstart : EventListener var outerHTML : StringGets the markup of the element including its content. When used as a setter, replaces the element with nodes parsed from the given string. Setter throws DOMException. var outerText : StringSetter throws DOMException. var previousElementSibling(default,null) : ElementThe element immediately preceding the given one in the tree, or null if there is no sibling element. var pseudo : String var scrollHeight(default,null) : IntThe scroll view height of an element. var scrollLeft : IntGets/sets the left scroll offset of an element. var scrollTop : IntGets/sets the top scroll offset of an element. var scrollWidth(default,null) : IntThe scroll view width of an element. var spellcheck : BoolControls spell-checking (present on all HTML elements) var style(default,null) : CSSStyleDeclarationAn object representing the declarations of an element's style attributes. var tabIndex : IntGets/sets the position of the element in the tabbing order. var tagName(default,null) : StringThe name of the tag for the given element. var title : StringA string that appears in a popup box when mouse is over the element. var translate : Bool function blur() : Void function click() : Void function focus() : Void function getAttribute( name : String ) : String function getAttributeNS( ?namespaceURI : String, localName : String ) : String function getAttributeNode( name : String ) : Attr function getAttributeNodeNS( ?namespaceURI : String, localName : String ) : Attr function getBoundingClientRect() : ClientRect function getClientRects() : ClientRectList function getElementsByClassName( name : String ) : NodeList function getElementsByTagName( name : String ) : NodeList function getElementsByTagNameNS( ?namespaceURI : String, localName : String ) : NodeList function hasAttribute( name : String ) : Bool function hasAttributeNS( ?namespaceURI : String, localName : String ) : Bool function insertAdjacentElement( where : String, element : Element ) : Element function insertAdjacentHTML( where : String, html : String ) : Void function insertAdjacentText( where : String, text : String ) : Void function matchesSelector( selectors : String ) : Bool function querySelector( selectors : String ) : Element function querySelectorAll( selectors : String ) : NodeList function remove() : Void function removeAttribute( name : String ) : Void function removeAttributeNS( namespaceURI : String, localName : String ) : Void function removeAttributeNode( oldAttr : Attr ) : Attr function requestFullScreen( flags : Int ) : Void function requestFullscreen() : Void function requestPointerLock() : Void function scrollByLines( lines : Int ) : Void function scrollByPages( pages : Int ) : Void function scrollIntoView( ?alignWithTop : Bool ) : Void function scrollIntoViewIfNeeded( ?centerIfNeeded : Bool ) : Void function setAttribute( name : String, value : String ) : Void function setAttributeNS( ?namespaceURI : String, qualifiedName : String, value : String ) : Void function setAttributeNode( newAttr : Attr ) : Attr function setAttributeNodeNS( newAttr : Attr ) : Attr static inline var ALLOW_KEYBOARD_INPUT : Int
version #19199, modified 2013-05-08 11:06:45 by api
0 comment