gecko-dev/dom/interfaces/core/nsIDOMElement.idl

74 строки
2.8 KiB
Plaintext

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsIDOMNode.idl"
interface nsIDOMMozNamedAttrMap;
%{C++
// Undo the windows.h damage
#undef GetMessage
#undef CreateEvent
#undef GetClassName
#undef GetBinaryType
#undef RemoveDirectory
%}
/**
* The nsIDOMElement interface represents an element in an HTML or
* XML document.
*
* For more information on this interface please see
* http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element
*/
[uuid(6289999b-1008-4269-b42a-413ec5a9d3f4)]
interface nsIDOMElement : nsIDOMNode
{
readonly attribute DOMString tagName;
attribute DOMString id;
attribute DOMString className;
/**
* Returns a DOMTokenList object reflecting the class attribute.
*/
readonly attribute nsISupports classList;
readonly attribute nsIDOMMozNamedAttrMap attributes;
DOMString getAttribute(in DOMString name);
DOMString getAttributeNS(in DOMString namespaceURI,
in DOMString localName);
void setAttribute(in DOMString name,
in DOMString value);
void setAttributeNS(in DOMString namespaceURI,
in DOMString qualifiedName,
in DOMString value);
void removeAttribute(in DOMString name);
void removeAttributeNS(in DOMString namespaceURI,
in DOMString localName);
boolean hasAttribute(in DOMString name);
boolean hasAttributeNS(in DOMString namespaceURI,
in DOMString localName);
boolean hasAttributes();
// Obsolete methods.
nsIDOMAttr getAttributeNode(in DOMString name);
nsIDOMAttr setAttributeNode(in nsIDOMAttr newAttr);
nsIDOMAttr removeAttributeNode(in nsIDOMAttr oldAttr);
nsIDOMAttr getAttributeNodeNS(in DOMString namespaceURI,
in DOMString localName);
nsIDOMAttr setAttributeNodeNS(in nsIDOMAttr newAttr)
raises(DOMException);
nsIDOMHTMLCollection getElementsByTagName(in DOMString name);
nsIDOMHTMLCollection getElementsByTagNameNS(in DOMString namespaceURI,
in DOMString localName);
/**
* Retrieve elements matching all classes listed in a
* space-separated string.
*/
nsIDOMHTMLCollection getElementsByClassName(in DOMString classes);
};