2012-10-10 23:53:02 +04: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 16:31:24 +04:00
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
2012-10-10 23:53:02 +04:00
* Opera Software ASA. You are granted a license to use, reproduce
* and create derivative works of this document.
*/
2014-01-14 00:08:56 +04:00
[TreatNonObjectAsNull]
2012-10-10 23:53:02 +04:00
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;
2012-10-09 16:31:24 +04:00
2014-01-14 00:08:56 +04:00
[TreatNonObjectAsNull]
2013-10-08 19:51:15 +04:00
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
2012-11-09 20:00:25 +04:00
2014-01-14 00:08:56 +04:00
[TreatNonObjectAsNull]
2017-01-26 23:40:09 +03: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 19:59:33 +04:00
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
2013-01-29 17:44:00 +04:00
[NoInterfaceObject]
interface GlobalEventHandlers {
attribute EventHandler onabort;
2013-10-08 19:51:15 +04:00
attribute EventHandler onblur;
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
// below.
// attribute OnErrorEventHandler onerror;
attribute EventHandler onfocus;
2013-01-29 17:44:00 +04:00
//(Not implemented)attribute EventHandler oncancel;
2016-12-01 03:48:02 +03:00
attribute EventHandler onauxclick;
2013-01-29 17:44:00 +04:00
attribute EventHandler oncanplay;
attribute EventHandler oncanplaythrough;
attribute EventHandler onchange;
attribute EventHandler onclick;
2016-12-23 18:01:50 +03:00
attribute EventHandler onclose;
2013-01-29 17:44:00 +04:00
attribute EventHandler oncontextmenu;
//(Not implemented)attribute EventHandler oncuechange;
attribute EventHandler ondblclick;
attribute EventHandler ondrag;
attribute EventHandler ondragend;
attribute EventHandler ondragenter;
2016-08-03 14:45:46 +03:00
attribute EventHandler ondragexit;
2013-01-29 17:44:00 +04: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 19:51:15 +04:00
attribute EventHandler onload;
2013-01-29 17:44:00 +04:00
attribute EventHandler onloadeddata;
attribute EventHandler onloadedmetadata;
2016-08-16 07:01:12 +03:00
attribute EventHandler onloadend;
2013-01-29 17:44:00 +04:00
attribute EventHandler onloadstart;
attribute EventHandler onmousedown;
2013-10-08 19:51:15 +04:00
[LenientThis] attribute EventHandler onmouseenter;
[LenientThis] attribute EventHandler onmouseleave;
2013-01-29 17:44:00 +04:00
attribute EventHandler onmousemove;
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
attribute EventHandler onmouseup;
2017-07-12 00:49:25 +03:00
attribute EventHandler onwheel;
2013-01-29 17:44:00 +04:00
attribute EventHandler onpause;
attribute EventHandler onplay;
attribute EventHandler onplaying;
attribute EventHandler onprogress;
attribute EventHandler onratechange;
attribute EventHandler onreset;
2014-12-04 19:26:00 +03:00
attribute EventHandler onresize;
2013-10-08 19:51:15 +04:00
attribute EventHandler onscroll;
2013-01-29 17:44:00 +04: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 20:26:01 +03:00
[Pref="dom.select_events.enabled"]
attribute EventHandler onselectstart;
2016-03-12 14:53:51 +03:00
attribute EventHandler ontoggle;
2013-11-21 09:44:22 +04:00
// Pointer events handlers
[Pref="dom.w3c_pointer_events.enabled"]
2014-02-28 04:13:05 +04:00
attribute EventHandler onpointercancel;
[Pref="dom.w3c_pointer_events.enabled"]
2013-11-21 09:44:22 +04: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 21:09:10 +04:00
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler ongotpointercapture;
[Pref="dom.w3c_pointer_events.enabled"]
attribute EventHandler onlostpointercapture;
2013-11-21 09:44:22 +04:00
2016-05-24 06:21:22 +03:00
// Mozilla-specific handlers. Unprefixed handlers live in
// Document rather than here.
2013-01-29 17:44:00 +04:00
attribute EventHandler onmozfullscreenchange;
attribute EventHandler onmozfullscreenerror;
2016-08-05 02:12:14 +03:00
// CSS-Animation and CSS-Transition handlers.
2017-02-10 06:32:44 +03:00
attribute EventHandler onanimationcancel;
2016-08-05 02:12:14 +03:00
attribute EventHandler onanimationend;
attribute EventHandler onanimationiteration;
attribute EventHandler onanimationstart;
2016-12-20 10:03:29 +03:00
attribute EventHandler ontransitioncancel;
2016-08-05 02:12:14 +03:00
attribute EventHandler ontransitionend;
2016-10-19 09:16:51 +03:00
attribute EventHandler ontransitionrun;
attribute EventHandler ontransitionstart;
2016-08-05 08:12:38 +03: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 17:44:00 +04:00
};
2013-01-29 17:44:00 +04:00
2013-01-29 17:44:00 +04:00
[NoInterfaceObject]
interface WindowEventHandlers {
attribute EventHandler onafterprint;
attribute EventHandler onbeforeprint;
2013-10-08 19:51:15 +04:00
attribute OnBeforeUnloadEventHandler onbeforeunload;
2013-01-29 17:44:00 +04:00
attribute EventHandler onhashchange;
2014-05-12 15:48:15 +04:00
attribute EventHandler onlanguagechange;
2013-01-29 17:44:00 +04:00
attribute EventHandler onmessage;
attribute EventHandler onoffline;
attribute EventHandler ononline;
attribute EventHandler onpagehide;
attribute EventHandler onpageshow;
attribute EventHandler onpopstate;
2015-11-18 02:09:53 +03:00
attribute EventHandler onstorage;
2013-01-29 17:44:00 +04:00
attribute EventHandler onunload;
};
2013-10-08 19:51:15 +04:00
2017-01-13 18:41:20 +03:00
[NoInterfaceObject]
interface DocumentAndElementEventHandlers {
attribute EventHandler oncopy;
attribute EventHandler oncut;
attribute EventHandler onpaste;
};
2013-10-08 19:51:15 +04: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 19:51:42 +04:00
[NoInterfaceObject]
interface OnErrorEventHandlerForWindow {
attribute OnErrorEventHandler onerror;
};