1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * http://www.whatwg.org/specs/web-apps/current-work/ and
8 * http://dev.w3.org/csswg/cssom-view/
10 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
11 * Opera Software ASA. You are granted a license to use, reproduce
12 * and create derivative works of this document.
15 interface HTMLElement : Element {
16 // metadata attributes
17 attribute DOMString title;
18 attribute DOMString lang;
19 // attribute boolean translate;
21 attribute DOMString dir;
23 readonly attribute DOMStringMap dataset;
27 attribute boolean itemScope;
28 [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
30 attribute DOMString itemId;
31 [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
32 [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
34 readonly attribute HTMLPropertiesCollection properties;
36 attribute any itemValue;
40 attribute boolean hidden;
43 attribute long tabIndex;
49 attribute DOMString accessKey;
51 readonly attribute DOMString accessKeyLabel;
53 attribute boolean draggable;
54 //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
56 attribute DOMString contentEditable;
58 readonly attribute boolean isContentEditable;
60 readonly attribute HTMLMenuElement? contextMenu;
62 // attribute HTMLMenuElement? contextMenu;
64 attribute boolean spellcheck;
67 //readonly attribute DOMString? commandType;
68 //readonly attribute DOMString? commandLabel;
69 //readonly attribute DOMString? commandIcon;
70 //readonly attribute boolean? commandHidden;
71 //readonly attribute boolean? commandDisabled;
72 //readonly attribute boolean? commandChecked;
75 [PutForwards=cssText, Constant]
76 readonly attribute CSSStyleDeclaration style;
78 // Mozilla specific stuff
79 // FIXME Bug 810677 Move className from HTMLElement to Element
80 attribute DOMString className;
82 attribute EventHandler oncopy;
83 attribute EventHandler oncut;
84 attribute EventHandler onpaste;
87 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
88 partial interface HTMLElement {
89 // CSSOM things are not [Pure] because they can flush
90 readonly attribute Element? offsetParent;
91 readonly attribute long offsetTop;
92 readonly attribute long offsetLeft;
93 readonly attribute long offsetWidth;
94 readonly attribute long offsetHeight;
97 // Extension for scroll-grabbing, used in the B2G dynamic toolbar.
98 // This is likely to be revised.
99 partial interface HTMLElement {
100 [Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
101 attribute boolean scrollgrab;
105 interface TouchEventHandlers {
106 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
107 attribute EventHandler ontouchstart;
108 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
109 attribute EventHandler ontouchend;
110 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
111 attribute EventHandler ontouchmove;
112 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
113 attribute EventHandler ontouchenter;
114 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
115 attribute EventHandler ontouchleave;
116 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
117 attribute EventHandler ontouchcancel;
120 HTMLElement implements GlobalEventHandlers;
121 HTMLElement implements TouchEventHandlers;
122 HTMLElement implements OnErrorEventHandlerForNodes;
124 interface HTMLUnknownElement : HTMLElement {};