tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

HTMLElement.webidl (4586B)


      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 */
     14 
     15 [Exposed=Window]
     16 interface HTMLElement : Element {
     17  [HTMLConstructor] constructor();
     18 
     19  // metadata attributes
     20  [CEReactions]
     21           attribute DOMString title;
     22  [CEReactions]
     23           attribute DOMString lang;
     24  [CEReactions, SetterThrows, Pure]
     25           attribute boolean translate;
     26  [CEReactions, SetterThrows, Pure]
     27           attribute DOMString dir;
     28 
     29  [CEReactions, GetterThrows, Pure]
     30           attribute [LegacyNullToEmptyString] DOMString innerText;
     31  [CEReactions, GetterThrows, SetterThrows, Pure]
     32           attribute [LegacyNullToEmptyString] DOMString outerText;
     33 
     34  // user interaction
     35  [CEReactions, SetterThrows, Pure]
     36           attribute (boolean or unrestricted double or DOMString)? hidden;
     37  [CEReactions, SetterThrows, Pure]
     38           attribute boolean inert;
     39  [NeedsCallerType]
     40  undefined click();
     41  [CEReactions, SetterThrows, Pure]
     42           attribute DOMString accessKey;
     43  [Pure]
     44  readonly attribute DOMString accessKeyLabel;
     45  [CEReactions, SetterThrows, Pure]
     46           attribute boolean draggable;
     47  //[PutForwards=value] readonly attribute DOMTokenList dropzone;
     48  [CEReactions, SetterThrows, Pure]
     49           attribute DOMString contentEditable;
     50  [Pure]
     51  readonly attribute boolean isContentEditable;
     52  [CEReactions, SetterThrows, Pure]
     53           attribute DOMString? popover;
     54  [CEReactions, SetterThrows, Pure]
     55           attribute boolean spellcheck;
     56  [CEReactions, Pure, SetterThrows]
     57           attribute DOMString inputMode;
     58  [CEReactions, Pure, SetterThrows]
     59           attribute DOMString enterKeyHint;
     60  [CEReactions, Pure, SetterThrows]
     61           attribute DOMString autocapitalize;
     62  [CEReactions, Pure, SetterThrows, Pref="dom.forms.autocorrect"]
     63           attribute boolean autocorrect;
     64 
     65  attribute DOMString nonce;
     66 
     67  // command API
     68  //readonly attribute DOMString? commandType;
     69  //readonly attribute DOMString? commandLabel;
     70  //readonly attribute DOMString? commandIcon;
     71  //readonly attribute boolean? commandHidden;
     72  //readonly attribute boolean? commandDisabled;
     73  //readonly attribute boolean? commandChecked;
     74 
     75  // https://html.spec.whatwg.org/multipage/custom-elements.html#dom-attachinternals
     76  [Throws]
     77  ElementInternals attachInternals();
     78 
     79  [Throws] undefined showPopover(optional ShowPopoverOptions options = {});
     80  [Throws] undefined hidePopover();
     81  [Throws] boolean togglePopover(optional (TogglePopoverOptions or boolean) options = {});
     82 };
     83 
     84 dictionary ShowPopoverOptions {
     85  HTMLElement source;
     86 };
     87 
     88 dictionary TogglePopoverOptions : ShowPopoverOptions {
     89  boolean force;
     90 };
     91 
     92 // https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlelement-interface
     93 // We make this an interface mixin to be shared with XULElement.
     94 interface mixin ElementOffsetAttributes {
     95  // CSSOM things are not [Pure] because they can flush
     96  readonly attribute Element? offsetParent;
     97  readonly attribute long offsetTop;
     98  readonly attribute long offsetLeft;
     99  readonly attribute long offsetWidth;
    100  readonly attribute long offsetHeight;
    101 };
    102 
    103 partial interface HTMLElement {
    104  [ChromeOnly]
    105  readonly attribute ElementInternals? internals;
    106 
    107  [ChromeOnly]
    108  readonly attribute boolean isFormAssociatedCustomElement;
    109 };
    110 
    111 interface mixin TouchEventHandlers {
    112  [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
    113           attribute EventHandler ontouchstart;
    114  [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
    115           attribute EventHandler ontouchend;
    116  [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
    117           attribute EventHandler ontouchmove;
    118  [Func="nsGenericHTMLElement::LegacyTouchAPIEnabled"]
    119           attribute EventHandler ontouchcancel;
    120 };
    121 
    122 HTMLElement includes ElementOffsetAttributes;
    123 HTMLElement includes GlobalEventHandlers;
    124 HTMLElement includes HTMLOrForeignElement;
    125 HTMLElement includes ElementCSSInlineStyle;
    126 HTMLElement includes TouchEventHandlers;
    127 HTMLElement includes OnErrorEventHandlerForNodes;
    128 
    129 [Exposed=Window]
    130 interface HTMLUnknownElement : HTMLElement {};