dom/webidl/EventHandler.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 4 * You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5 *
michael@0 6 * The origin of this IDL file is
michael@0 7 * http://www.whatwg.org/specs/web-apps/current-work/#eventhandler
michael@0 8 *
michael@0 9 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
michael@0 10 * Opera Software ASA. You are granted a license to use, reproduce
michael@0 11 * and create derivative works of this document.
michael@0 12 */
michael@0 13 [TreatNonObjectAsNull]
michael@0 14 callback EventHandlerNonNull = any (Event event);
michael@0 15 typedef EventHandlerNonNull? EventHandler;
michael@0 16
michael@0 17 [TreatNonObjectAsNull]
michael@0 18 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=23489
michael@0 19 //callback OnBeforeUnloadEventHandlerNonNull = DOMString (Event event);
michael@0 20 callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
michael@0 21 typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
michael@0 22
michael@0 23 [TreatNonObjectAsNull]
michael@0 24 callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
michael@0 25 typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
michael@0 26
michael@0 27 [NoInterfaceObject]
michael@0 28 interface GlobalEventHandlers {
michael@0 29 attribute EventHandler onabort;
michael@0 30 attribute EventHandler onblur;
michael@0 31 // We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
michael@0 32 // below.
michael@0 33 // attribute OnErrorEventHandler onerror;
michael@0 34 attribute EventHandler onfocus;
michael@0 35 //(Not implemented)attribute EventHandler oncancel;
michael@0 36 attribute EventHandler oncanplay;
michael@0 37 attribute EventHandler oncanplaythrough;
michael@0 38 attribute EventHandler onchange;
michael@0 39 attribute EventHandler onclick;
michael@0 40 //(Not implemented)attribute EventHandler onclose;
michael@0 41 attribute EventHandler oncontextmenu;
michael@0 42 //(Not implemented)attribute EventHandler oncuechange;
michael@0 43 attribute EventHandler ondblclick;
michael@0 44 attribute EventHandler ondrag;
michael@0 45 attribute EventHandler ondragend;
michael@0 46 attribute EventHandler ondragenter;
michael@0 47 //(Not implemented)attribute EventHandler ondragexit;
michael@0 48 attribute EventHandler ondragleave;
michael@0 49 attribute EventHandler ondragover;
michael@0 50 attribute EventHandler ondragstart;
michael@0 51 attribute EventHandler ondrop;
michael@0 52 attribute EventHandler ondurationchange;
michael@0 53 attribute EventHandler onemptied;
michael@0 54 attribute EventHandler onended;
michael@0 55 attribute EventHandler oninput;
michael@0 56 attribute EventHandler oninvalid;
michael@0 57 attribute EventHandler onkeydown;
michael@0 58 attribute EventHandler onkeypress;
michael@0 59 attribute EventHandler onkeyup;
michael@0 60 attribute EventHandler onload;
michael@0 61 attribute EventHandler onloadeddata;
michael@0 62 attribute EventHandler onloadedmetadata;
michael@0 63 attribute EventHandler onloadstart;
michael@0 64 attribute EventHandler onmousedown;
michael@0 65 [LenientThis] attribute EventHandler onmouseenter;
michael@0 66 [LenientThis] attribute EventHandler onmouseleave;
michael@0 67 attribute EventHandler onmousemove;
michael@0 68 attribute EventHandler onmouseout;
michael@0 69 attribute EventHandler onmouseover;
michael@0 70 attribute EventHandler onmouseup;
michael@0 71 //(Not implemented)attribute EventHandler onmousewheel;
michael@0 72 attribute EventHandler onpause;
michael@0 73 attribute EventHandler onplay;
michael@0 74 attribute EventHandler onplaying;
michael@0 75 attribute EventHandler onprogress;
michael@0 76 attribute EventHandler onratechange;
michael@0 77 attribute EventHandler onreset;
michael@0 78 attribute EventHandler onscroll;
michael@0 79 attribute EventHandler onseeked;
michael@0 80 attribute EventHandler onseeking;
michael@0 81 attribute EventHandler onselect;
michael@0 82 attribute EventHandler onshow;
michael@0 83 //(Not implemented)attribute EventHandler onsort;
michael@0 84 attribute EventHandler onstalled;
michael@0 85 attribute EventHandler onsubmit;
michael@0 86 attribute EventHandler onsuspend;
michael@0 87 attribute EventHandler ontimeupdate;
michael@0 88 attribute EventHandler onvolumechange;
michael@0 89 attribute EventHandler onwaiting;
michael@0 90
michael@0 91 // Pointer events handlers
michael@0 92 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 93 attribute EventHandler onpointercancel;
michael@0 94 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 95 attribute EventHandler onpointerdown;
michael@0 96 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 97 attribute EventHandler onpointerup;
michael@0 98 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 99 attribute EventHandler onpointermove;
michael@0 100 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 101 attribute EventHandler onpointerout;
michael@0 102 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 103 attribute EventHandler onpointerover;
michael@0 104 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 105 attribute EventHandler onpointerenter;
michael@0 106 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 107 attribute EventHandler onpointerleave;
michael@0 108 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 109 attribute EventHandler ongotpointercapture;
michael@0 110 [Pref="dom.w3c_pointer_events.enabled"]
michael@0 111 attribute EventHandler onlostpointercapture;
michael@0 112
michael@0 113 // Mozilla-specific handlers
michael@0 114 attribute EventHandler onmozfullscreenchange;
michael@0 115 attribute EventHandler onmozfullscreenerror;
michael@0 116 attribute EventHandler onmozpointerlockchange;
michael@0 117 attribute EventHandler onmozpointerlockerror;
michael@0 118 };
michael@0 119
michael@0 120 [NoInterfaceObject]
michael@0 121 interface WindowEventHandlers {
michael@0 122 attribute EventHandler onafterprint;
michael@0 123 attribute EventHandler onbeforeprint;
michael@0 124 attribute OnBeforeUnloadEventHandler onbeforeunload;
michael@0 125 attribute EventHandler onhashchange;
michael@0 126 attribute EventHandler onmessage;
michael@0 127 attribute EventHandler onoffline;
michael@0 128 attribute EventHandler ononline;
michael@0 129 attribute EventHandler onpagehide;
michael@0 130 attribute EventHandler onpageshow;
michael@0 131 attribute EventHandler onpopstate;
michael@0 132 attribute EventHandler onresize;
michael@0 133 //(Not implemented)attribute EventHandler onstorage;
michael@0 134 attribute EventHandler onunload;
michael@0 135 };
michael@0 136
michael@0 137 // The spec has |attribute OnErrorEventHandler onerror;| on
michael@0 138 // GlobalEventHandlers, and calls the handler differently depending on
michael@0 139 // whether an ErrorEvent was fired. We don't do that, and until we do we'll
michael@0 140 // need to distinguish between onerror on Window or on nodes.
michael@0 141
michael@0 142 [NoInterfaceObject]
michael@0 143 interface OnErrorEventHandlerForNodes {
michael@0 144 attribute EventHandler onerror;
michael@0 145 };
michael@0 146
michael@0 147 [NoInterfaceObject]
michael@0 148 interface OnErrorEventHandlerForWindow {
michael@0 149 attribute OnErrorEventHandler onerror;
michael@0 150 };

mercurial