dom/webidl/HTMLElement.webidl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial