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/.
5 *
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/
9 *
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.
13 */
14
15[HTMLConstructor]
16interface HTMLElement : Element {
17  // metadata attributes
18  [CEReactions]
19           attribute DOMString title;
20  [CEReactions]
21           attribute long scrollHeight;
22  [CEReactions]
23           attribute long scrollTop;
24  [CEReactions]
25           attribute DOMString lang;
26  //         attribute boolean translate;
27  [CEReactions, SetterThrows, Pure]
28           attribute DOMString dir;
29  [Constant]
30  readonly attribute DOMStringMap dataset;
31
32  [CEReactions, GetterThrows, Pure, TreatNullAs=EmptyString]
33           attribute DOMString innerText;
34
35  // user interaction
36  [CEReactions, SetterThrows, Pure]
37           attribute boolean hidden;
38  [NeedsCallerType]
39  undefined click();
40  [CEReactions, SetterThrows, Pure]
41           attribute long tabIndex;
42  [Throws]
43  undefined focus();
44  [Throws]
45  undefined blur();
46  [CEReactions, SetterThrows, Pure]
47           attribute DOMString accessKey;
48  [Pure]
49  readonly attribute DOMString accessKeyLabel;
50  [CEReactions, SetterThrows, Pure]
51           attribute boolean draggable;
52  //[PutForwards=value] readonly attribute DOMTokenList dropzone;
53  [CEReactions, SetterThrows, Pure]
54           attribute DOMString contentEditable;
55  [Pure]
56  readonly attribute boolean isContentEditable;
57  //[Pure]
58  //readonly attribute HTMLMenuElement? contextMenu;
59  //[SetterThrows]
60  //         attribute HTMLMenuElement? contextMenu;
61  [CEReactions, SetterThrows, Pure]
62           attribute boolean spellcheck;
63
64  // command API
65  //readonly attribute DOMString? commandType;
66  //readonly attribute DOMString? commandLabel;
67  //readonly attribute DOMString? commandIcon;
68  //readonly attribute boolean? commandHidden;
69  //readonly attribute boolean? commandDisabled;
70  //readonly attribute boolean? commandChecked;
71
72  // styling
73  [PutForwards=cssText, Constant]
74  readonly attribute CSSStyleDeclaration style;
75};
76
77// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
78partial interface HTMLElement {
79  // CSSOM things are not [Pure] because they can flush
80  readonly attribute Element? offsetParent;
81  readonly attribute long offsetTop;
82  readonly attribute long offsetLeft;
83  readonly attribute long offsetWidth;
84  readonly attribute long offsetHeight;
85};
86
87interface mixin TouchEventHandlers {
88  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
89           attribute EventHandler ontouchstart;
90  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
91           attribute EventHandler ontouchend;
92  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
93           attribute EventHandler ontouchmove;
94  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
95           attribute EventHandler ontouchcancel;
96};
97
98HTMLElement includes GlobalEventHandlers;
99HTMLElement includes DocumentAndElementEventHandlers;
100HTMLElement includes TouchEventHandlers;
101HTMLElement includes OnErrorEventHandlerForNodes;
102
103interface HTMLUnknownElement : HTMLElement {};
104