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 attribute EventHandler oncopy;
80 attribute EventHandler oncut;
81 attribute EventHandler onpaste;
84 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
85 partial interface HTMLElement {
86 // CSSOM things are not [Pure] because they can flush
87 readonly attribute Element? offsetParent;
88 readonly attribute long offsetTop;
89 readonly attribute long offsetLeft;
90 readonly attribute long offsetWidth;
91 readonly attribute long offsetHeight;
94 // Extension for scroll-grabbing, used in the B2G dynamic toolbar.
95 // This is likely to be revised.
96 partial interface HTMLElement {
97 [Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
98 attribute boolean scrollgrab;
102 interface TouchEventHandlers {
103 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
104 attribute EventHandler ontouchstart;
105 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
106 attribute EventHandler ontouchend;
107 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
108 attribute EventHandler ontouchmove;
109 [Func="nsGenericHTMLElement::TouchEventsEnabled"]
110 attribute EventHandler ontouchcancel;
113 HTMLElement implements GlobalEventHandlers;
114 HTMLElement implements TouchEventHandlers;
115 HTMLElement implements OnErrorEventHandlerForNodes;
117 interface HTMLUnknownElement : HTMLElement {};