michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMElement.idl" michael@0: #include "nsIVariant.idl" michael@0: michael@0: interface nsIDOMHTMLMenuElement; michael@0: michael@0: /** michael@0: * The nsIDOMHTMLElement interface is the primary [X]HTML element michael@0: * interface. It represents a single [X]HTML element in the document michael@0: * tree. michael@0: * michael@0: * This interface is trying to follow the DOM Level 2 HTML specification: michael@0: * http://www.w3.org/TR/DOM-Level-2-HTML/ michael@0: * michael@0: * with changes from the work-in-progress WHATWG HTML specification: michael@0: * http://www.whatwg.org/specs/web-apps/current-work/ michael@0: */ michael@0: [scriptable, uuid(e29ddc73-ac40-40fe-8bbd-14bf2d52c53a)] michael@0: interface nsIDOMHTMLElement : nsIDOMElement michael@0: { michael@0: // metadata attributes michael@0: attribute DOMString id; michael@0: attribute DOMString title; michael@0: attribute DOMString lang; michael@0: attribute DOMString dir; michael@0: [binaryname(DOMClassName)] michael@0: attribute DOMString className; michael@0: readonly attribute nsISupports dataset; michael@0: michael@0: attribute boolean itemScope; michael@0: attribute nsIVariant itemType; michael@0: attribute DOMString itemId; michael@0: readonly attribute nsISupports properties; michael@0: // The following attributes are really nsDOMSettableTokenList, which has michael@0: // PutForwards, so we express them as nsIVariants to deal with this. michael@0: attribute nsIVariant itemValue; michael@0: attribute nsIVariant itemProp; michael@0: attribute nsIVariant itemRef; michael@0: michael@0: // user interaction michael@0: /** michael@0: * Indicates that the element is not yet, or is no longer, relevant. michael@0: * michael@0: * See . michael@0: */ michael@0: attribute boolean hidden; michael@0: [binaryname(DOMClick)] michael@0: void click(); michael@0: attribute long tabIndex; michael@0: void focus(); michael@0: [binaryname(DOMBlur)] michael@0: void blur(); michael@0: attribute DOMString accessKey; michael@0: readonly attribute DOMString accessKeyLabel; michael@0: attribute boolean draggable; michael@0: attribute DOMString contentEditable; michael@0: readonly attribute boolean isContentEditable; michael@0: readonly attribute nsIDOMHTMLMenuElement contextMenu; michael@0: attribute boolean spellcheck; michael@0: michael@0: michael@0: // DOM Parsing and Serialization michael@0: attribute DOMString innerHTML; michael@0: attribute DOMString outerHTML; michael@0: void insertAdjacentHTML(in DOMString position, michael@0: in DOMString text); michael@0: michael@0: michael@0: // CSSOM View michael@0: [optional_argc] void scrollIntoView([optional] in boolean top); michael@0: readonly attribute nsIDOMElement offsetParent; michael@0: readonly attribute long offsetTop; michael@0: readonly attribute long offsetLeft; michael@0: readonly attribute long offsetWidth; michael@0: readonly attribute long offsetHeight; michael@0: };