2012-10-10 19:53:02 +00:00
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.whatwg.org/specs/web-apps/current-work/#eventhandler
*
2012-10-09 12:31:24 +00:00
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
2012-10-10 19:53:02 +00:00
* Opera Software ASA. You are granted a license to use, reproduce
* and create derivative works of this document.
*/
2014-01-13 20:08:56 +00:00
[TreatNonObjectAsNull]
2012-10-10 19:53:02 +00:00
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
2012-10-09 12:31:24 +00:00
2014-01-13 20:08:56 +00:00
[TreatNonObjectAsNull]
2013-10-08 15:51:15 +00:00
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
2012-11-09 16:00:25 +00:00
2014-01-13 20:08:56 +00:00
[TreatNonObjectAsNull]
2017-01-26 20:40:09 +00:00
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column, optional any error);
2012-11-09 15:59:33 +00:00
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
2013-01-29 13:44:00 +00:00
[NoInterfaceObject]
interface GlobalEventHandlers {
attribute EventHandler onabort;
2013-10-08 15:51:15 +00:00
attribute EventHandler onblur;
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
// below.
// attribute OnErrorEventHandler onerror;
attribute EventHandler onfocus;
2013-01-29 13:44:00 +00:00
//(Not implemented)attribute EventHandler oncancel;
2016-12-01 00:48:02 +00:00
attribute EventHandler onauxclick;
2013-01-29 13:44:00 +00:00
attribute EventHandler oncanplay;
attribute EventHandler oncanplaythrough;
attribute EventHandler onchange;
attribute EventHandler onclick;
2016-12-23 15:01:50 +00:00
attribute EventHandler onclose;
2013-01-29 13:44:00 +00:00
attribute EventHandler oncontextmenu;
//(Not implemented)attribute EventHandler oncuechange;
attribute EventHandler ondblclick;
attribute EventHandler ondrag;
attribute EventHandler ondragend;
attribute EventHandler ondragenter;
2016-08-03 11:45:46 +00:00
attribute EventHandler ondragexit;
2013-01-29 13:44:00 +00:00
attribute EventHandler ondragleave;
attribute EventHandler ondragover;
attribute EventHandler ondragstart;
attribute EventHandler ondrop;
attribute EventHandler ondurationchange;
attribute EventHandler onemptied;
attribute EventHandler onended;
attribute EventHandler oninput;
attribute EventHandler oninvalid;
attribute EventHandler onkeydown;
attribute EventHandler onkeypress;
attribute EventHandler onkeyup;
2013-10-08 15:51:15 +00:00
attribute EventHandler onload;
2013-01-29 13:44:00 +00:00
attribute EventHandler onloadeddata;
attribute EventHandler onloadedmetadata;
2016-08-16 04:01:12 +00:00
attribute EventHandler onloadend;
2013-01-29 13:44:00 +00:00
attribute EventHandler onloadstart;
attribute EventHandler onmousedown;
2013-10-08 15:51:15 +00:00
[LenientThis] attribute EventHandler onmouseenter;
[LenientThis] attribute EventHandler onmouseleave;
2013-01-29 13:44:00 +00:00
attribute EventHandler onmousemove;
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
attribute EventHandler onmouseup;
2017-07-11 21:49:25 +00:00
attribute EventHandler onwheel;
2013-01-29 13:44:00 +00:00
attribute EventHandler onpause;
attribute EventHandler onplay;
attribute EventHandler onplaying;
attribute EventHandler onprogress;
attribute EventHandler onratechange;
attribute EventHandler onreset;
2014-12-04 16:26:00 +00:00
attribute EventHandler onresize;
2013-10-08 15:51:15 +00:00
attribute EventHandler onscroll;
2013-01-29 13:44:00 +00:00
attribute EventHandler onseeked;
attribute EventHandler onseeking;
attribute EventHandler onselect;
attribute EventHandler onshow;
//(Not implemented)attribute EventHandler onsort;
attribute EventHandler onstalled;
attribute EventHandler onsubmit;
attribute EventHandler onsuspend;
attribute EventHandler ontimeupdate;
attribute EventHandler onvolumechange;
attribute EventHandler onwaiting;
2015-08-12 17:26:01 +00:00
[Pref="dom.select_events.enabled"]
attribute EventHandler onselectstart;
2016-03-12 11:53:51 +00:00
attribute EventHandler ontoggle;
2013-11-21 05:44:22 +00:00
// Pointer events handlers
[Pref="dom.w3c_pointer_events.enabled"]
2014-02-28 00:13:05 +00:00
attribute EventHandler onpointercancel;
[Pref="dom.w3c_pointer_events.enabled"]
2013-11-21 05:44:22 +00:00
attribute EventHandler onpointerdown;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointerup;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointermove;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointerout;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointerover;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointerenter;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onpointerleave;
2014-04-04 17:09:10 +00:00
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler ongotpointercapture;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onlostpointercapture;
2013-11-21 05:44:22 +00:00
2016-05-24 03:21:22 +00:00
// Mozilla-specific handlers. Unprefixed handlers live in
// Document rather than here.
2013-01-29 13:44:00 +00:00
attribute EventHandler onmozfullscreenchange;
attribute EventHandler onmozfullscreenerror;
2016-08-04 23:12:14 +00:00
// CSS-Animation and CSS-Transition handlers.
2017-02-10 03:32:44 +00:00
attribute EventHandler onanimationcancel;
2016-08-04 23:12:14 +00:00
attribute EventHandler onanimationend;
attribute EventHandler onanimationiteration;
attribute EventHandler onanimationstart;
2016-12-20 07:03:29 +00:00
attribute EventHandler ontransitioncancel;
2016-08-04 23:12:14 +00:00
attribute EventHandler ontransitionend;
2016-10-19 06:16:51 +00:00
attribute EventHandler ontransitionrun;
attribute EventHandler ontransitionstart;
2016-08-05 05:12:38 +00:00
// CSS-Animation and CSS-Transition legacy handlers.
// This handler isn't standard.
attribute EventHandler onwebkitanimationend;
attribute EventHandler onwebkitanimationiteration;
attribute EventHandler onwebkitanimationstart;
attribute EventHandler onwebkittransitionend;
2013-01-29 13:44:00 +00:00
};
2013-01-29 13:44:00 +00:00
2013-01-29 13:44:00 +00:00
[NoInterfaceObject]
interface WindowEventHandlers {
attribute EventHandler onafterprint;
attribute EventHandler onbeforeprint;
2013-10-08 15:51:15 +00:00
attribute OnBeforeUnloadEventHandler onbeforeunload;
2013-01-29 13:44:00 +00:00
attribute EventHandler onhashchange;
2014-05-12 11:48:15 +00:00
attribute EventHandler onlanguagechange;
2013-01-29 13:44:00 +00:00
attribute EventHandler onmessage;
2017-09-13 03:59:06 +00:00
attribute EventHandler onmessageerror;
2013-01-29 13:44:00 +00:00
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onpagehide;
attribute EventHandler onpageshow;
attribute EventHandler onpopstate;
2015-11-17 23:09:53 +00:00
attribute EventHandler onstorage;
2013-01-29 13:44:00 +00:00
attribute EventHandler onunload;
};
2013-10-08 15:51:15 +00:00
2017-01-13 15:41:20 +00:00
[NoInterfaceObject]
interface DocumentAndElementEventHandlers {
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
};
2013-10-08 15:51:15 +00:00
// The spec has |attribute OnErrorEventHandler onerror;| on
// GlobalEventHandlers, and calls the handler differently depending on
// whether an ErrorEvent was fired. We don't do that, and until we do we'll
// need to distinguish between onerror on Window or on nodes.
[NoInterfaceObject]
interface OnErrorEventHandlerForNodes {
attribute EventHandler onerror;
};
2013-10-08 15:51:42 +00:00
[NoInterfaceObject]
interface OnErrorEventHandlerForWindow {
attribute OnErrorEventHandler onerror;
};