2012-10-10 12:53:02 -07: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 05:31:24 -07:00
|
|
|
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
|
2012-10-10 12:53:02 -07:00
|
|
|
* Opera Software ASA. You are granted a license to use, reproduce
|
|
|
|
* and create derivative works of this document.
|
|
|
|
*/
|
|
|
|
[TreatNonCallableAsNull]
|
|
|
|
callback EventHandlerNonNull = any (Event event);
|
|
|
|
typedef EventHandlerNonNull? EventHandler;
|
2012-10-09 05:31:24 -07:00
|
|
|
|
2012-11-09 07:59:33 -08:00
|
|
|
[TreatNonCallableAsNull]
|
2013-10-08 08:51:15 -07:00
|
|
|
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=23489
|
|
|
|
//callback OnBeforeUnloadEventHandlerNonNull = DOMString (Event event);
|
2013-10-08 08:51:15 -07:00
|
|
|
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
|
|
|
|
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
2012-11-09 08:00:25 -08:00
|
|
|
|
|
|
|
[TreatNonCallableAsNull]
|
|
|
|
callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column);
|
2012-11-09 07:59:33 -08:00
|
|
|
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
|
2013-01-29 05:44:00 -08:00
|
|
|
|
|
|
|
[NoInterfaceObject]
|
|
|
|
interface GlobalEventHandlers {
|
|
|
|
attribute EventHandler onabort;
|
2013-10-08 08:51:15 -07:00
|
|
|
attribute EventHandler onblur;
|
|
|
|
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
|
|
|
|
// below.
|
|
|
|
// attribute OnErrorEventHandler onerror;
|
|
|
|
attribute EventHandler onfocus;
|
2013-01-29 05:44:00 -08: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 08:51:15 -07:00
|
|
|
//(Not implemented)attribute EventHandler ondragexit;
|
2013-01-29 05:44:00 -08: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 08:51:15 -07:00
|
|
|
attribute EventHandler onload;
|
2013-01-29 05:44:00 -08:00
|
|
|
attribute EventHandler onloadeddata;
|
|
|
|
attribute EventHandler onloadedmetadata;
|
|
|
|
attribute EventHandler onloadstart;
|
|
|
|
attribute EventHandler onmousedown;
|
2013-10-08 08:51:15 -07:00
|
|
|
[LenientThis] attribute EventHandler onmouseenter;
|
|
|
|
[LenientThis] attribute EventHandler onmouseleave;
|
2013-01-29 05:44:00 -08: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;
|
2013-10-08 08:51:15 -07:00
|
|
|
attribute EventHandler onscroll;
|
2013-01-29 05:44:00 -08: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;
|
|
|
|
|
|
|
|
// Mozilla-specific handlers
|
|
|
|
attribute EventHandler onmozfullscreenchange;
|
|
|
|
attribute EventHandler onmozfullscreenerror;
|
|
|
|
attribute EventHandler onmozpointerlockchange;
|
|
|
|
attribute EventHandler onmozpointerlockerror;
|
|
|
|
};
|
2013-01-29 05:44:00 -08:00
|
|
|
|
2013-01-29 05:44:00 -08:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface WindowEventHandlers {
|
|
|
|
attribute EventHandler onafterprint;
|
|
|
|
attribute EventHandler onbeforeprint;
|
2013-10-08 08:51:15 -07:00
|
|
|
attribute OnBeforeUnloadEventHandler onbeforeunload;
|
2013-01-29 05:44:00 -08:00
|
|
|
attribute EventHandler onhashchange;
|
|
|
|
attribute EventHandler onmessage;
|
|
|
|
attribute EventHandler onoffline;
|
|
|
|
attribute EventHandler ononline;
|
|
|
|
attribute EventHandler onpagehide;
|
|
|
|
attribute EventHandler onpageshow;
|
|
|
|
attribute EventHandler onpopstate;
|
|
|
|
attribute EventHandler onresize;
|
|
|
|
//(Not implemented)attribute EventHandler onstorage;
|
|
|
|
attribute EventHandler onunload;
|
|
|
|
};
|
2013-10-08 08:51:15 -07: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 08:51:42 -07:00
|
|
|
[NoInterfaceObject]
|
|
|
|
interface OnErrorEventHandlerForWindow {
|
|
|
|
attribute OnErrorEventHandler onerror;
|
|
|
|
};
|