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
|
|
|
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=23489
|
|
|
|
//callback OnBeforeUnloadEventHandlerNonNull = DOMString (Event event);
|
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]
|
2014-01-03 05:04:15 +04:00
|
|
|
callback OnErrorEventHandlerNonNull = boolean ((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;
|
|
|
|
attribute EventHandler oncanplay;
|
|
|
|
attribute EventHandler oncanplaythrough;
|
|
|
|
attribute EventHandler onchange;
|
|
|
|
attribute EventHandler onclick;
|
|
|
|
//(Not implemented)attribute EventHandler onclose;
|
|
|
|
attribute EventHandler oncontextmenu;
|
|
|
|
//(Not implemented)attribute EventHandler oncuechange;
|
|
|
|
attribute EventHandler ondblclick;
|
|
|
|
attribute EventHandler ondrag;
|
|
|
|
attribute EventHandler ondragend;
|
|
|
|
attribute EventHandler ondragenter;
|
2013-10-08 19:51:15 +04:00
|
|
|
//(Not implemented)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;
|
|
|
|
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;
|
|
|
|
//(Not implemented)attribute EventHandler onmousewheel;
|
|
|
|
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;
|
|
|
|
|
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-02-17 03:47:11 +03:00
|
|
|
// Fullscreen events handlers
|
|
|
|
attribute EventHandler onfullscreenchange;
|
|
|
|
attribute EventHandler onfullscreenerror;
|
2013-01-29 17:44:00 +04:00
|
|
|
attribute EventHandler onmozfullscreenchange;
|
|
|
|
attribute EventHandler onmozfullscreenerror;
|
2016-02-17 03:47:11 +03:00
|
|
|
|
|
|
|
// Mozilla-specific handlers
|
2013-01-29 17:44:00 +04:00
|
|
|
attribute EventHandler onmozpointerlockchange;
|
|
|
|
attribute EventHandler onmozpointerlockerror;
|
|
|
|
};
|
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
|
|
|
|
|
|
|
// 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;
|
|
|
|
};
|