2012-11-11 03:30:15 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* http://www.whatwg.org/specs/web-apps/current-work/ and
|
|
|
|
* http://dev.w3.org/csswg/cssom-view/
|
|
|
|
*
|
|
|
|
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
|
|
|
* Opera Software ASA. You are granted a license to use, reproduce
|
|
|
|
* and create derivative works of this document.
|
|
|
|
*/
|
|
|
|
|
|
|
|
interface HTMLElement : Element {
|
|
|
|
// metadata attributes
|
|
|
|
attribute DOMString title;
|
|
|
|
attribute DOMString lang;
|
|
|
|
// attribute boolean translate;
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute DOMString dir;
|
2012-12-26 02:00:15 +04:00
|
|
|
[Constant]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute DOMStringMap dataset;
|
|
|
|
|
|
|
|
// microdata
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute boolean itemScope;
|
2012-12-26 02:00:15 +04:00
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute DOMString itemId;
|
2012-12-26 02:00:15 +04:00
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
|
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
|
|
|
|
[Constant]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute HTMLPropertiesCollection properties;
|
|
|
|
[Throws]
|
|
|
|
attribute any itemValue;
|
|
|
|
|
|
|
|
// user interaction
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute boolean hidden;
|
|
|
|
void click();
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute long tabIndex;
|
|
|
|
[Throws]
|
|
|
|
void focus();
|
|
|
|
[Throws]
|
|
|
|
void blur();
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute DOMString accessKey;
|
2013-01-30 02:53:53 +04:00
|
|
|
[Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute DOMString accessKeyLabel;
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute boolean draggable;
|
|
|
|
//[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute DOMString contentEditable;
|
2013-01-30 02:53:53 +04:00
|
|
|
[Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute boolean isContentEditable;
|
2013-01-30 02:53:53 +04:00
|
|
|
[Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute HTMLMenuElement? contextMenu;
|
|
|
|
//[SetterThrows]
|
|
|
|
// attribute HTMLMenuElement? contextMenu;
|
2013-01-30 02:53:53 +04:00
|
|
|
[SetterThrows, Pure]
|
2012-11-11 03:30:15 +04:00
|
|
|
attribute boolean spellcheck;
|
|
|
|
|
|
|
|
// command API
|
|
|
|
//readonly attribute DOMString? commandType;
|
|
|
|
//readonly attribute DOMString? commandLabel;
|
|
|
|
//readonly attribute DOMString? commandIcon;
|
|
|
|
//readonly attribute boolean? commandHidden;
|
|
|
|
//readonly attribute boolean? commandDisabled;
|
|
|
|
//readonly attribute boolean? commandChecked;
|
|
|
|
|
|
|
|
// styling
|
2013-03-20 20:22:25 +04:00
|
|
|
[PutForwards=cssText, Constant]
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute CSSStyleDeclaration style;
|
|
|
|
|
|
|
|
// Mozilla specific stuff
|
|
|
|
attribute EventHandler oncopy;
|
|
|
|
attribute EventHandler oncut;
|
|
|
|
attribute EventHandler onpaste;
|
|
|
|
};
|
|
|
|
|
|
|
|
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
|
|
|
|
partial interface HTMLElement {
|
2013-01-30 02:53:53 +04:00
|
|
|
// CSSOM things are not [Pure] because they can flush
|
2012-11-11 03:30:15 +04:00
|
|
|
readonly attribute Element? offsetParent;
|
|
|
|
readonly attribute long offsetTop;
|
|
|
|
readonly attribute long offsetLeft;
|
|
|
|
readonly attribute long offsetWidth;
|
|
|
|
readonly attribute long offsetHeight;
|
|
|
|
};
|
|
|
|
|
2013-11-21 00:23:43 +04:00
|
|
|
// Extension for scroll-grabbing, used in the B2G dynamic toolbar.
|
|
|
|
// This is likely to be revised.
|
|
|
|
partial interface HTMLElement {
|
|
|
|
[Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
|
|
|
|
attribute boolean scrollgrab;
|
|
|
|
};
|
|
|
|
|
2013-01-29 21:51:55 +04:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface TouchEventHandlers {
|
2013-09-17 15:01:28 +04:00
|
|
|
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 21:51:55 +04:00
|
|
|
attribute EventHandler ontouchstart;
|
2013-09-17 15:01:28 +04:00
|
|
|
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 21:51:55 +04:00
|
|
|
attribute EventHandler ontouchend;
|
2013-09-17 15:01:28 +04:00
|
|
|
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 21:51:55 +04:00
|
|
|
attribute EventHandler ontouchmove;
|
2013-09-17 15:01:28 +04:00
|
|
|
[Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 21:51:55 +04:00
|
|
|
attribute EventHandler ontouchcancel;
|
|
|
|
};
|
|
|
|
|
2013-01-29 17:44:00 +04:00
|
|
|
HTMLElement implements GlobalEventHandlers;
|
2013-01-29 21:51:55 +04:00
|
|
|
HTMLElement implements TouchEventHandlers;
|
2013-10-08 19:51:15 +04:00
|
|
|
HTMLElement implements OnErrorEventHandlerForNodes;
|
2013-01-29 17:44:00 +04:00
|
|
|
|
2012-11-11 03:30:15 +04:00
|
|
|
interface HTMLUnknownElement : HTMLElement {};
|