dom/webidl/HTMLElement.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/HTMLElement.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,125 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + *
     1.9 + * The origin of this IDL file is
    1.10 + * http://www.whatwg.org/specs/web-apps/current-work/ and
    1.11 + * http://dev.w3.org/csswg/cssom-view/
    1.12 + *
    1.13 + * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
    1.14 + * Opera Software ASA. You are granted a license to use, reproduce
    1.15 + * and create derivative works of this document.
    1.16 + */
    1.17 +
    1.18 +interface HTMLElement : Element {
    1.19 +  // metadata attributes
    1.20 +           attribute DOMString title;
    1.21 +           attribute DOMString lang;
    1.22 +  //         attribute boolean translate;
    1.23 +  [SetterThrows, Pure]
    1.24 +           attribute DOMString dir;
    1.25 +  [Constant]
    1.26 +  readonly attribute DOMStringMap dataset;
    1.27 +
    1.28 +  // microdata 
    1.29 +  [SetterThrows, Pure]
    1.30 +           attribute boolean itemScope;
    1.31 +  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemType;
    1.32 +  [SetterThrows, Pure]
    1.33 +           attribute DOMString itemId;
    1.34 +  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemRef;
    1.35 +  [PutForwards=value,Constant] readonly attribute DOMSettableTokenList itemProp;
    1.36 +  [Constant]
    1.37 +  readonly attribute HTMLPropertiesCollection properties;
    1.38 +  [Throws]
    1.39 +           attribute any itemValue;
    1.40 +
    1.41 +  // user interaction
    1.42 +  [SetterThrows, Pure]
    1.43 +           attribute boolean hidden;
    1.44 +  void click();
    1.45 +  [SetterThrows, Pure]
    1.46 +           attribute long tabIndex;
    1.47 +  [Throws]
    1.48 +  void focus();
    1.49 +  [Throws]
    1.50 +  void blur();
    1.51 +  [SetterThrows, Pure]
    1.52 +           attribute DOMString accessKey;
    1.53 +  [Pure]
    1.54 +  readonly attribute DOMString accessKeyLabel;
    1.55 +  [SetterThrows, Pure]
    1.56 +           attribute boolean draggable;
    1.57 +  //[PutForwards=value] readonly attribute DOMSettableTokenList dropzone;
    1.58 +  [SetterThrows, Pure]
    1.59 +           attribute DOMString contentEditable;
    1.60 +  [Pure]
    1.61 +  readonly attribute boolean isContentEditable;
    1.62 +  [Pure]
    1.63 +  readonly attribute HTMLMenuElement? contextMenu;
    1.64 +  //[SetterThrows]
    1.65 +  //         attribute HTMLMenuElement? contextMenu;
    1.66 +  [SetterThrows, Pure]
    1.67 +           attribute boolean spellcheck;
    1.68 +
    1.69 +  // command API
    1.70 +  //readonly attribute DOMString? commandType;
    1.71 +  //readonly attribute DOMString? commandLabel;
    1.72 +  //readonly attribute DOMString? commandIcon;
    1.73 +  //readonly attribute boolean? commandHidden;
    1.74 +  //readonly attribute boolean? commandDisabled;
    1.75 +  //readonly attribute boolean? commandChecked;
    1.76 +
    1.77 +  // styling
    1.78 +  [PutForwards=cssText, Constant]
    1.79 +  readonly attribute CSSStyleDeclaration style;
    1.80 +
    1.81 +  // Mozilla specific stuff
    1.82 +  // FIXME Bug 810677 Move className from HTMLElement to Element
    1.83 +  [Pure]
    1.84 +           attribute DOMString className;
    1.85 +
    1.86 +           attribute EventHandler oncopy;
    1.87 +           attribute EventHandler oncut;
    1.88 +           attribute EventHandler onpaste;
    1.89 +};
    1.90 +
    1.91 +// http://dev.w3.org/csswg/cssom-view/#extensions-to-the-htmlelement-interface
    1.92 +partial interface HTMLElement {
    1.93 +  // CSSOM things are not [Pure] because they can flush
    1.94 +  readonly attribute Element? offsetParent;
    1.95 +  readonly attribute long offsetTop;
    1.96 +  readonly attribute long offsetLeft;
    1.97 +  readonly attribute long offsetWidth;
    1.98 +  readonly attribute long offsetHeight;
    1.99 +};
   1.100 +
   1.101 +// Extension for scroll-grabbing, used in the B2G dynamic toolbar.
   1.102 +// This is likely to be revised.
   1.103 +partial interface HTMLElement {
   1.104 +  [Func="nsGenericHTMLElement::IsScrollGrabAllowed"]
   1.105 +           attribute boolean scrollgrab;
   1.106 +};
   1.107 +
   1.108 +[NoInterfaceObject]
   1.109 +interface TouchEventHandlers {
   1.110 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.111 +           attribute EventHandler ontouchstart;
   1.112 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.113 +           attribute EventHandler ontouchend;
   1.114 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.115 +           attribute EventHandler ontouchmove;
   1.116 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.117 +           attribute EventHandler ontouchenter;
   1.118 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.119 +           attribute EventHandler ontouchleave;
   1.120 +  [Func="nsGenericHTMLElement::TouchEventsEnabled"]
   1.121 +           attribute EventHandler ontouchcancel;
   1.122 +};
   1.123 +
   1.124 +HTMLElement implements GlobalEventHandlers;
   1.125 +HTMLElement implements TouchEventHandlers;
   1.126 +HTMLElement implements OnErrorEventHandlerForNodes;
   1.127 +
   1.128 +interface HTMLUnknownElement : HTMLElement {};

mercurial