Backout a74bd5095902, Bug 959405 - Please update the Buri Moz-central, 1.3, 1.2 with...
[gecko.git] / dom / webidl / HTMLElement.webidl
blobba824de3a030aa68a0ef4a03e614cd70a43b4065
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  */
15 interface HTMLElement : Element {
16   // metadata attributes
17            attribute DOMString title;
18            attribute DOMString lang;
19   //         attribute boolean translate;
20   [SetterThrows, Pure]
21            attribute DOMString dir;
22   [Constant]
23   readonly attribute DOMStringMap dataset;
25   // microdata 
26   [SetterThrows, Pure]
27            attribute boolean itemScope;
28   [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
29   [SetterThrows, Pure]
30            attribute DOMString itemId;
31   [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
32   [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
33   [Constant]
34   readonly attribute HTMLPropertiesCollection properties;
35   [Throws]
36            attribute any itemValue;
38   // user interaction
39   [SetterThrows, Pure]
40            attribute boolean hidden;
41   void click();
42   [SetterThrows, Pure]
43            attribute long tabIndex;
44   [Throws]
45   void focus();
46   [Throws]
47   void blur();
48   [SetterThrows, Pure]
49            attribute DOMString accessKey;
50   [Pure]
51   readonly attribute DOMString accessKeyLabel;
52   [SetterThrows, Pure]
53            attribute boolean draggable;
54   //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
55   [SetterThrows, Pure]
56            attribute DOMString contentEditable;
57   [Pure]
58   readonly attribute boolean isContentEditable;
59   [Pure]
60   readonly attribute HTMLMenuElement? contextMenu;
61   //[SetterThrows]
62   //         attribute HTMLMenuElement? contextMenu;
63   [SetterThrows, Pure]
64            attribute boolean spellcheck;
66   // command API
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;
74   // styling
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;
104 [NoInterfaceObject]
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 {};