tor-browser

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

EventHandler.webidl (8640B)


      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/#eventhandler
      8 *
      9 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
     10 * Opera Software ASA. You are granted a license to use, reproduce
     11 * and create derivative works of this document.
     12 */
     13 [LegacyTreatNonObjectAsNull]
     14 callback EventHandlerNonNull = any (Event event);
     15 typedef EventHandlerNonNull? EventHandler;
     16 
     17 [LegacyTreatNonObjectAsNull]
     18 callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
     19 typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
     20 
     21 [LegacyTreatNonObjectAsNull]
     22 callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional UTF8String source, optional unsigned long lineno, optional unsigned long column, optional any error);
     23 typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
     24 
     25 interface mixin GlobalEventHandlers {
     26           attribute EventHandler onabort;
     27           attribute EventHandler onblur;
     28 // We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
     29 // below.
     30 //         attribute OnErrorEventHandler onerror;
     31           attribute EventHandler onfocus;
     32           attribute EventHandler oncancel;
     33           attribute EventHandler onauxclick;
     34           attribute EventHandler onbeforeinput;
     35           // https://html.spec.whatwg.org/#event-beforematch
     36           [Pref="dom.hidden_until_found.enabled"]
     37           attribute EventHandler onbeforematch;
     38           attribute EventHandler onbeforetoggle;
     39           attribute EventHandler oncanplay;
     40           attribute EventHandler oncanplaythrough;
     41           attribute EventHandler onchange;
     42           attribute EventHandler onclick;
     43           attribute EventHandler onclose;
     44           attribute EventHandler oncontentvisibilityautostatechange;
     45           attribute EventHandler oncontextlost;
     46           attribute EventHandler oncontextmenu;
     47           [Pref="dom.element.commandfor.enabled"]
     48           attribute EventHandler oncommand;
     49           attribute EventHandler oncontextrestored;
     50           attribute EventHandler oncopy;
     51           attribute EventHandler oncuechange;
     52           attribute EventHandler oncut;
     53           attribute EventHandler ondblclick;
     54           attribute EventHandler ondrag;
     55           attribute EventHandler ondragend;
     56           attribute EventHandler ondragenter;
     57           [Func="Event::IsDragExitEnabled"]
     58           attribute EventHandler ondragexit;
     59           attribute EventHandler ondragleave;
     60           attribute EventHandler ondragover;
     61           attribute EventHandler ondragstart;
     62           attribute EventHandler ondrop;
     63           attribute EventHandler ondurationchange;
     64           attribute EventHandler onemptied;
     65           attribute EventHandler onended;
     66           attribute EventHandler onformdata;
     67           attribute EventHandler oninput;
     68           attribute EventHandler oninvalid;
     69           attribute EventHandler onkeydown;
     70           attribute EventHandler onkeypress;
     71           attribute EventHandler onkeyup;
     72           attribute EventHandler onload;
     73           attribute EventHandler onloadeddata;
     74           attribute EventHandler onloadedmetadata;
     75           attribute EventHandler onloadstart;
     76           attribute EventHandler onmousedown;
     77  [LegacyLenientThis] attribute EventHandler onmouseenter;
     78  [LegacyLenientThis] attribute EventHandler onmouseleave;
     79           attribute EventHandler onmousemove;
     80           attribute EventHandler onmouseout;
     81           attribute EventHandler onmouseover;
     82           attribute EventHandler onmouseup;
     83           attribute EventHandler onwheel;
     84           attribute EventHandler onpaste;
     85           attribute EventHandler onpause;
     86           attribute EventHandler onplay;
     87           attribute EventHandler onplaying;
     88           attribute EventHandler onprogress;
     89           attribute EventHandler onratechange;
     90           attribute EventHandler onreset;
     91           attribute EventHandler onresize;
     92           attribute EventHandler onscroll;
     93           attribute EventHandler onscrollend;
     94           attribute EventHandler onsecuritypolicyviolation;
     95           attribute EventHandler onseeked;
     96           attribute EventHandler onseeking;
     97           attribute EventHandler onselect;
     98           attribute EventHandler onslotchange;
     99           //(Not implemented)attribute EventHandler onsort;
    100           attribute EventHandler onstalled;
    101           attribute EventHandler onsubmit;
    102           attribute EventHandler onsuspend;
    103           attribute EventHandler ontimeupdate;
    104           attribute EventHandler onvolumechange;
    105           attribute EventHandler onwaiting;
    106 
    107           attribute EventHandler onselectstart;
    108           attribute EventHandler onselectionchange;
    109 
    110           attribute EventHandler ontoggle;
    111 
    112           // Pointer events handlers
    113           attribute EventHandler onpointercancel;
    114           attribute EventHandler onpointerdown;
    115           attribute EventHandler onpointerup;
    116           attribute EventHandler onpointermove;
    117           attribute EventHandler onpointerout;
    118           attribute EventHandler onpointerover;
    119           attribute EventHandler onpointerenter;
    120           attribute EventHandler onpointerleave;
    121           [SecureContext, Pref="dom.event.pointer.rawupdate.enabled"]
    122           attribute EventHandler onpointerrawupdate;
    123           attribute EventHandler ongotpointercapture;
    124           attribute EventHandler onlostpointercapture;
    125 
    126           // Mozilla-specific handlers. Unprefixed handlers live in
    127           // Document rather than here.
    128           [Deprecated="MozfullscreenchangeDeprecatedPrefix"]
    129           attribute EventHandler onmozfullscreenchange;
    130           [Deprecated="MozfullscreenerrorDeprecatedPrefix"]
    131           attribute EventHandler onmozfullscreenerror;
    132 
    133           // CSS-Animation and CSS-Transition handlers.
    134           attribute EventHandler onanimationcancel;
    135           attribute EventHandler onanimationend;
    136           attribute EventHandler onanimationiteration;
    137           attribute EventHandler onanimationstart;
    138           attribute EventHandler ontransitioncancel;
    139           attribute EventHandler ontransitionend;
    140           attribute EventHandler ontransitionrun;
    141           attribute EventHandler ontransitionstart;
    142 
    143           // CSS-Animation and CSS-Transition legacy handlers.
    144           // This handler isn't standard.
    145           [BinaryName="onwebkitAnimationEnd"]
    146           attribute EventHandler onwebkitanimationend;
    147           [BinaryName="onwebkitAnimationIteration"]
    148           attribute EventHandler onwebkitanimationiteration;
    149           [BinaryName="onwebkitAnimationStart"]
    150           attribute EventHandler onwebkitanimationstart;
    151           [BinaryName="onwebkitTransitionEnd"]
    152           attribute EventHandler onwebkittransitionend;
    153 };
    154 
    155 interface mixin WindowEventHandlers {
    156           attribute EventHandler onafterprint;
    157           attribute EventHandler onbeforeprint;
    158           attribute OnBeforeUnloadEventHandler onbeforeunload;
    159           attribute EventHandler onhashchange;
    160           attribute EventHandler onlanguagechange;
    161           attribute EventHandler onmessage;
    162           attribute EventHandler onmessageerror;
    163           attribute EventHandler onoffline;
    164           attribute EventHandler ononline;
    165           attribute EventHandler onpagehide;
    166           attribute EventHandler onpageshow;
    167           attribute EventHandler onpopstate;
    168           attribute EventHandler onrejectionhandled;
    169           attribute EventHandler onstorage;
    170           attribute EventHandler onunhandledrejection;
    171           attribute EventHandler onunload;
    172 };
    173 
    174 // https://w3c.github.io/gamepad/#extensions-to-the-windoweventhandlers-interface-mixin
    175 partial interface mixin WindowEventHandlers {
    176  attribute EventHandler ongamepadconnected;
    177  attribute EventHandler ongamepaddisconnected;
    178 };
    179 
    180 // The spec has |attribute OnErrorEventHandler onerror;| on
    181 // GlobalEventHandlers, and calls the handler differently depending on
    182 // whether an ErrorEvent was fired. We don't do that, and until we do we'll
    183 // need to distinguish between onerror on Window or on nodes.
    184 
    185 interface mixin OnErrorEventHandlerForNodes {
    186           attribute EventHandler onerror;
    187 };
    188 
    189 interface mixin OnErrorEventHandlerForWindow {
    190           attribute OnErrorEventHandler onerror;
    191 };