2012-11-10 15:30:15 -08: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 DOMStringMap;
|
|
|
|
|
|
|
|
interface HTMLElement : Element {
|
|
|
|
// metadata attributes
|
|
|
|
attribute DOMString title;
|
|
|
|
attribute DOMString lang;
|
|
|
|
// attribute boolean translate;
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute DOMString dir;
|
2012-12-25 14:00:15 -08:00
|
|
|
[Constant]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute DOMStringMap dataset;
|
|
|
|
|
|
|
|
// microdata
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute boolean itemScope;
|
2012-12-25 14:00:15 -08:00
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute DOMString itemId;
|
2012-12-25 14:00:15 -08:00
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
|
|
|
|
[PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
|
|
|
|
[Constant]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute HTMLPropertiesCollection properties;
|
|
|
|
[Throws]
|
|
|
|
attribute any itemValue;
|
|
|
|
|
|
|
|
// user interaction
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute boolean hidden;
|
|
|
|
void click();
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute long tabIndex;
|
|
|
|
[Throws]
|
|
|
|
void focus();
|
|
|
|
[Throws]
|
|
|
|
void blur();
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute DOMString accessKey;
|
2013-01-29 14:53:53 -08:00
|
|
|
[Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute DOMString accessKeyLabel;
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute boolean draggable;
|
|
|
|
//[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
attribute DOMString contentEditable;
|
2013-01-29 14:53:53 -08:00
|
|
|
[Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute boolean isContentEditable;
|
2013-01-29 14:53:53 -08:00
|
|
|
[Pure]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute HTMLMenuElement? contextMenu;
|
|
|
|
//[SetterThrows]
|
|
|
|
// attribute HTMLMenuElement? contextMenu;
|
2013-01-29 14:53:53 -08:00
|
|
|
[SetterThrows, Pure]
|
2012-11-10 15:30:15 -08: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-01-11 00:42:59 -08:00
|
|
|
[Constant]
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute CSSStyleDeclaration style;
|
|
|
|
|
|
|
|
// Mozilla specific stuff
|
|
|
|
// FIXME Bug 810677 Move className from HTMLElement to Element
|
|
|
|
attribute DOMString className;
|
|
|
|
|
|
|
|
[SetterThrows]
|
|
|
|
attribute EventHandler oncopy;
|
|
|
|
[SetterThrows]
|
|
|
|
attribute EventHandler oncut;
|
|
|
|
[SetterThrows]
|
|
|
|
attribute EventHandler onpaste;
|
|
|
|
};
|
|
|
|
|
|
|
|
// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
|
|
|
|
partial interface HTMLElement {
|
2013-01-29 14:53:53 -08:00
|
|
|
// CSSOM things are not [Pure] because they can flush
|
2012-11-10 15:30:15 -08:00
|
|
|
readonly attribute Element? offsetParent;
|
|
|
|
readonly attribute long offsetTop;
|
|
|
|
readonly attribute long offsetLeft;
|
|
|
|
readonly attribute long offsetWidth;
|
|
|
|
readonly attribute long offsetHeight;
|
|
|
|
};
|
|
|
|
|
2013-01-29 09:51:55 -08:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface TouchEventHandlers {
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchstart;
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchend;
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchmove;
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchenter;
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchleave;
|
2013-02-19 08:54:41 -08:00
|
|
|
[SetterThrows,Func="nsGenericHTMLElement::TouchEventsEnabled"]
|
2013-01-29 09:51:55 -08:00
|
|
|
attribute EventHandler ontouchcancel;
|
|
|
|
};
|
|
|
|
|
2013-01-29 05:44:00 -08:00
|
|
|
HTMLElement implements GlobalEventHandlers;
|
2013-01-29 05:44:00 -08:00
|
|
|
HTMLElement implements NodeEventHandlers;
|
2013-01-29 09:51:55 -08:00
|
|
|
HTMLElement implements TouchEventHandlers;
|
2013-01-29 05:44:00 -08:00
|
|
|
|
2012-11-10 15:30:15 -08:00
|
|
|
interface HTMLUnknownElement : HTMLElement {};
|