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.

     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   [Pure]
    81            attribute DOMString className;
    83            attribute EventHandler oncopy;
    84            attribute EventHandler oncut;
    85            attribute EventHandler onpaste;
    86 };
    88 // http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
    89 partial interface HTMLElement {
    90   // CSSOM things are not [Pure] because they can flush
    91   readonly attribute Element? offsetParent;
    92   readonly attribute long offsetTop;
    93   readonly attribute long offsetLeft;
    94   readonly attribute long offsetWidth;
    95   readonly attribute long offsetHeight;
    96 };
    98 // Extension for scroll-grabbing, used in the B2G dynamic toolbar.
    99 // This is likely to be revised.
   100 partial interface HTMLElement {
   101   [Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
   102            attribute boolean scrollgrab;
   103 };
   105 [NoInterfaceObject]
   106 interface TouchEventHandlers {
   107   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   108            attribute EventHandler ontouchstart;
   109   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   110            attribute EventHandler ontouchend;
   111   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   112            attribute EventHandler ontouchmove;
   113   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   114            attribute EventHandler ontouchenter;
   115   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   116            attribute EventHandler ontouchleave;
   117   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   118            attribute EventHandler ontouchcancel;
   119 };
   121 HTMLElement implements GlobalEventHandlers;
   122 HTMLElement implements TouchEventHandlers;
   123 HTMLElement implements OnErrorEventHandlerForNodes;
   125 interface HTMLUnknownElement : HTMLElement {};

mercurial