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 file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.whatwg.org/specs/web-apps/current-work/ and michael@0: * http://dev.w3.org/csswg/cssom-view/ michael@0: * michael@0: * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and michael@0: * Opera Software ASA. You are granted a license to use, reproduce michael@0: * and create derivative works of this document. michael@0: */ michael@0: michael@0: interface HTMLElement : Element { michael@0: // metadata attributes michael@0: attribute DOMString title; michael@0: attribute DOMString lang; michael@0: // attribute boolean translate; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString dir; michael@0: [Constant] michael@0: readonly attribute DOMStringMap dataset; michael@0: michael@0: // microdata michael@0: [SetterThrows, Pure] michael@0: attribute boolean itemScope; michael@0: [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString itemId; michael@0: [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef; michael@0: [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp; michael@0: [Constant] michael@0: readonly attribute HTMLPropertiesCollection properties; michael@0: [Throws] michael@0: attribute any itemValue; michael@0: michael@0: // user interaction michael@0: [SetterThrows, Pure] michael@0: attribute boolean hidden; michael@0: void click(); michael@0: [SetterThrows, Pure] michael@0: attribute long tabIndex; michael@0: [Throws] michael@0: void focus(); michael@0: [Throws] michael@0: void blur(); michael@0: [SetterThrows, Pure] michael@0: attribute DOMString accessKey; michael@0: [Pure] michael@0: readonly attribute DOMString accessKeyLabel; michael@0: [SetterThrows, Pure] michael@0: attribute boolean draggable; michael@0: //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone; michael@0: [SetterThrows, Pure] michael@0: attribute DOMString contentEditable; michael@0: [Pure] michael@0: readonly attribute boolean isContentEditable; michael@0: [Pure] michael@0: readonly attribute HTMLMenuElement? contextMenu; michael@0: //[SetterThrows] michael@0: // attribute HTMLMenuElement? contextMenu; michael@0: [SetterThrows, Pure] michael@0: attribute boolean spellcheck; michael@0: michael@0: // command API michael@0: //readonly attribute DOMString? commandType; michael@0: //readonly attribute DOMString? commandLabel; michael@0: //readonly attribute DOMString? commandIcon; michael@0: //readonly attribute boolean? commandHidden; michael@0: //readonly attribute boolean? commandDisabled; michael@0: //readonly attribute boolean? commandChecked; michael@0: michael@0: // styling michael@0: [PutForwards=cssText, Constant] michael@0: readonly attribute CSSStyleDeclaration style; michael@0: michael@0: // Mozilla specific stuff michael@0: // FIXME Bug 810677 Move className from HTMLElement to Element michael@0: [Pure] michael@0: attribute DOMString className; michael@0: michael@0: attribute EventHandler oncopy; michael@0: attribute EventHandler oncut; michael@0: attribute EventHandler onpaste; michael@0: }; michael@0: michael@0: // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface michael@0: partial interface HTMLElement { michael@0: // CSSOM things are not [Pure] because they can flush michael@0: readonly attribute Element? 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: }; michael@0: michael@0: // Extension for scroll-grabbing, used in the B2G dynamic toolbar. michael@0: // This is likely to be revised. michael@0: partial interface HTMLElement { michael@0: [Func="nsGenericHTMLElement::IsScrollGrabAllowed"] michael@0: attribute boolean scrollgrab; michael@0: }; michael@0: michael@0: [NoInterfaceObject] michael@0: interface TouchEventHandlers { michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchstart; michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchend; michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchmove; michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchenter; michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchleave; michael@0: [Func="nsGenericHTMLElement::TouchEventsEnabled"] michael@0: attribute EventHandler ontouchcancel; michael@0: }; michael@0: michael@0: HTMLElement implements GlobalEventHandlers; michael@0: HTMLElement implements TouchEventHandlers; michael@0: HTMLElement implements OnErrorEventHandlerForNodes; michael@0: michael@0: interface HTMLUnknownElement : HTMLElement {};