WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIDOMElement

IID:a6cf9078-15b3-11d2-932e-00805f8add32
Inherits From:nsIDOMNode

This interface is implemented by the following components:


Properties

readonly DOMString tagName

The nsIDOMElement interface represents an element in an HTML or XML document.

For more information on this interface please see http://www.w3.org/TR/DOM-Level-2-Core/


Methods

DOMString getAttribute ( DOMString name ) nsIDOMAttr getAttributeNode ( DOMString name ) nsIDOMAttr getAttributeNodeNS ( DOMString namespaceURI , DOMString localName ) DOMString getAttributeNS ( DOMString namespaceURI , DOMString localName ) nsIDOMNodeList getElementsByTagName ( DOMString name ) nsIDOMNodeList getElementsByTagNameNS ( DOMString namespaceURI , DOMString localName ) PRBool hasAttribute ( DOMString name ) PRBool hasAttributeNS ( DOMString namespaceURI , DOMString localName ) void removeAttribute ( DOMString name ) nsIDOMAttr removeAttributeNode ( nsIDOMAttr oldAttr ) void removeAttributeNS ( DOMString namespaceURI , DOMString localName ) void setAttribute ( DOMString name , DOMString value ) nsIDOMAttr setAttributeNode ( nsIDOMAttr newAttr ) nsIDOMAttr setAttributeNodeNS ( nsIDOMAttr newAttr ) void setAttributeNS ( DOMString namespaceURI , DOMString qualifiedName , DOMString value )

DOMString getAttribute ( DOMString name )

Arguments:
name

nsIDOMAttr getAttributeNode ( DOMString name )

Arguments:
name

nsIDOMAttr getAttributeNodeNS ( DOMString namespaceURI , DOMString localName )

Arguments:
namespaceURI
localName

DOMString getAttributeNS ( DOMString namespaceURI , DOMString localName )

Arguments:
namespaceURI
localName

nsIDOMNodeList getElementsByTagName ( DOMString name )

Arguments:
name

nsIDOMNodeList getElementsByTagNameNS ( DOMString namespaceURI , DOMString localName )

Arguments:
namespaceURI
localName

PRBool hasAttribute ( DOMString name )

Arguments:
name

PRBool hasAttributeNS ( DOMString namespaceURI , DOMString localName )

Arguments:
namespaceURI
localName

void removeAttribute ( DOMString name )

Arguments:
name

nsIDOMAttr removeAttributeNode ( nsIDOMAttr oldAttr )

Arguments:
oldAttr

void removeAttributeNS ( DOMString namespaceURI , DOMString localName )

Arguments:
namespaceURI
localName

void setAttribute ( DOMString name , DOMString value )

Arguments:
name
value

nsIDOMAttr setAttributeNode ( nsIDOMAttr newAttr )

Arguments:
newAttr

nsIDOMAttr setAttributeNodeNS ( nsIDOMAttr newAttr )

Arguments:
newAttr

void setAttributeNS ( DOMString namespaceURI , DOMString qualifiedName , DOMString value )

Arguments:
namespaceURI
qualifiedName
value

References

This interface is the type of the following properties:

nsIBoxObject.element, nsIBoxObject.firstChild, nsIBoxObject.lastChild, nsIBoxObject.nextSibling, nsIBoxObject.parentBox, nsIBoxObject.previousSibling, nsIDOMAttr.ownerElement, nsIDOMDocument.documentElement, nsIDOMNSDocument.activeElement, nsIDOMNSHTMLElement.offsetParent, nsIDOMWindowInternal.frameElement, nsIDOMXPathNamespace.ownerElement, nsIDOMXULCommandDispatcher.focusedElement, nsIDOMXULTreeElement.body, nsIEditor.rootElement, nsIHTMLAbsPosEditor.absolutelyPositionedSelectionContainer, nsIHTMLAbsPosEditor.positionedElement, nsIHTMLObjectResizer.resizedObject, nsIMenuBoxObject.activeChild, nsIPluginTagInfo2.DOMElement, nsITreeBoxObject.treeBody, nsITreeColumn.element, nsITypeAheadFind.foundEditable, nsITypeAheadFind.foundLink, nsIWebBrowserFocus.focusedElement, nsIXMLContentBuilder.current, nsIXMLContentBuilder.root, nsIXTFElementWrapper.documentFrameElement, nsIXTFElementWrapper.elementNode, nsIXULTemplateBuilder.root

This interface is passed as an argument to the following methods:

inIDOMUtils.getBindingURLs, inIDOMUtils.getCSSStyleRules, inIDOMUtils.getContentState, inIDOMUtils.setContentState, inIFlasher.drawElementOutline, inIFlasher.repaintElement, inIFlasher.scrollElementIntoView, nsIAutoCompletePopup.openAutocompletePopup, nsIDOMDocumentCSS.getOverrideStyle, nsIDOMDocumentXBL.addBinding, nsIDOMDocumentXBL.getAnonymousElementByAttribute, nsIDOMDocumentXBL.getAnonymousNodes, nsIDOMDocumentXBL.removeBinding, nsIDOMLSParserFilter.startElement, nsIDOMNSDocument.getBoxObjectFor, nsIDOMViewCSS.getComputedStyle, nsIDOMWindowUtils.focus, nsIDOMXULCommandDispatcher.addCommandUpdater, nsIDOMXULCommandDispatcher.advanceFocusIntoSubtree, nsIDOMXULCommandDispatcher.removeCommandUpdater, nsIDOMXULDocument.addBroadcastListenerFor, nsIDOMXULDocument.removeBroadcastListenerFor, nsIDOMXULPopupElement.showPopup, nsIEditor.getAttributeValue, nsIEditor.removeAttribute, nsIEditor.removeAttributeOrEquivalent, nsIEditor.setAttribute, nsIEditor.setAttributeOrEquivalent, nsIFeedTextConstruct.createDocumentFragment, nsIHTMLAbsPosEditor.absolutelyPositionElement, nsIHTMLAbsPosEditor.getElementZIndex, nsIHTMLAbsPosEditor.relativeChangeElementZIndex, nsIHTMLAbsPosEditor.setElementPosition, nsIHTMLAbsPosEditor.setElementZIndex, nsIHTMLAbsPosEditor.showGrabberOnElement, nsIHTMLEditor.insertElementAtSelection, nsIHTMLEditor.insertLinkAroundSelection, nsIHTMLEditor.isAnonymousElement, nsIHTMLEditor.selectElement, nsIHTMLEditor.setCaretAfterElement, nsIHTMLInlineTableEditor.doInlineTableEditingAction, nsIHTMLInlineTableEditor.showInlineTableEditingUI, nsIHTMLObjectResizeListener.onEndResizing, nsIHTMLObjectResizeListener.onStartResizing, nsIHTMLObjectResizer.mouseDown, nsIHTMLObjectResizer.mouseUp, nsIHTMLObjectResizer.showResizers, nsIListBoxObject.getIndexOfItem, nsIPopupBoxObject.openPopup, nsIPopupBoxObject.showPopup, nsIScriptableUnescapeHTML.parseFragment, nsIScrollBoxObject.ensureElementIsVisible, nsIScrollBoxObject.scrollToElement, nsITableEditor.getCellAt, nsITableEditor.getCellDataAt, nsITableEditor.getCellIndexes, nsITableEditor.getFirstRow, nsITableEditor.getSelectedCellsType, nsITableEditor.getTableSize, nsITableEditor.normalizeTable, nsITableEditor.selectBlockOfCells, nsITableEditor.setSelectionAfterTableEdit, nsITableEditor.switchTableCellHeaderType, nsITreeColumns.getColumnFor, nsITreeContentView.getIndexOfItem, nsIXMLContentBuilder.clear, nsIXTFElement.cloneState, nsIXTFElement.parentChanged, nsIXTFElement.willChangeParent, nsIXULBrowserWindow.setOverLink, nsIXULTemplateBuilder.getResultForContent, nsIXULTreeBuilder.sort, nsIXULTreeBuilderObserver.onCycleHeader

This interface is returned from the following methods:

nsIDOMDocument.createElement, nsIDOMDocument.createElementNS, nsIDOMDocument.getElementById, nsIDOMDocumentXBL.getAnonymousElementByAttribute, nsIDOMDocumentXBL.getBindingParent, nsIDOMNSDocument.elementFromPoint, nsIDOMSVGSVGElement.getElementById, nsIHTMLEditor.createAnonymousElement, nsIHTMLEditor.createElementWithDefaults, nsIHTMLEditor.getElementOrParentByTagName, nsIHTMLEditor.getSelectedElement, nsIHTMLEditor.getSelectionContainer, nsIListBoxObject.getItemAtIndex, nsITableEditor.getCellAt, nsITableEditor.getFirstSelectedCell, nsITableEditor.getFirstSelectedCellInTable, nsITableEditor.getNextSelectedCell, nsITableEditor.getSelectedOrParentTableElement, nsITableEditor.switchTableCellHeaderType, nsITreeContentView.getItemAtIndex, nsIUpdate.serialize, nsIUpdatePatch.serialize

Reference documentation is generated from Mozilla's source.