2018-09-13 20:04:55 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-03-31 04:42:20 +00:00
|
|
|
/* 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.w3.org/TR/2012/WD-dom-20120105/
|
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
2019-09-11 14:35:28 +00:00
|
|
|
[Exposed=(Window,Worker), ProbablyShortLivingWrapper]
|
2012-03-31 04:42:20 +00:00
|
|
|
interface Event {
|
2019-09-11 14:35:28 +00:00
|
|
|
constructor(DOMString type, optional EventInit eventInitDict = {});
|
|
|
|
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute DOMString type;
|
2018-05-08 17:52:42 +00:00
|
|
|
[Pure, BindingAlias="srcElement"]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute EventTarget? target;
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute EventTarget? currentTarget;
|
|
|
|
|
2017-12-18 16:07:36 +00:00
|
|
|
sequence<EventTarget> composedPath();
|
|
|
|
|
2013-03-09 11:34:29 +00:00
|
|
|
const unsigned short NONE = 0;
|
2012-03-31 04:42:20 +00:00
|
|
|
const unsigned short CAPTURING_PHASE = 1;
|
|
|
|
const unsigned short AT_TARGET = 2;
|
|
|
|
const unsigned short BUBBLING_PHASE = 3;
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute unsigned short eventPhase;
|
|
|
|
|
2022-09-21 07:44:58 +00:00
|
|
|
undefined stopPropagation();
|
|
|
|
undefined stopImmediatePropagation();
|
2012-03-31 04:42:20 +00:00
|
|
|
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute boolean bubbles;
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute boolean cancelable;
|
2016-11-16 19:10:22 +00:00
|
|
|
[NeedsCallerType]
|
2018-08-28 06:28:56 +00:00
|
|
|
attribute boolean returnValue;
|
|
|
|
[NeedsCallerType]
|
2022-09-21 07:44:58 +00:00
|
|
|
undefined preventDefault();
|
2016-11-16 19:10:22 +00:00
|
|
|
[Pure, NeedsCallerType]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute boolean defaultPrevented;
|
2016-03-15 05:45:23 +00:00
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute boolean defaultPreventedByChrome;
|
|
|
|
[ChromeOnly, Pure]
|
|
|
|
readonly attribute boolean defaultPreventedByContent;
|
2016-08-31 03:16:11 +00:00
|
|
|
[Pure]
|
|
|
|
readonly attribute boolean composed;
|
2012-03-31 04:42:20 +00:00
|
|
|
|
2021-04-11 03:13:32 +00:00
|
|
|
[LegacyUnforgeable, Pure]
|
2012-03-31 04:42:20 +00:00
|
|
|
readonly attribute boolean isTrusted;
|
2013-10-09 18:58:15 +00:00
|
|
|
[Pure]
|
2014-06-06 05:29:49 +00:00
|
|
|
readonly attribute DOMHighResTimeStamp timeStamp;
|
2012-03-31 04:42:20 +00:00
|
|
|
|
2022-09-21 07:44:58 +00:00
|
|
|
undefined initEvent(DOMString type,
|
|
|
|
optional boolean bubbles = false,
|
|
|
|
optional boolean cancelable = false);
|
2016-11-29 02:28:21 +00:00
|
|
|
attribute boolean cancelBubble;
|
2012-03-31 04:42:20 +00:00
|
|
|
};
|
|
|
|
|
2013-03-09 11:34:29 +00:00
|
|
|
// Mozilla specific legacy stuff.
|
|
|
|
partial interface Event {
|
|
|
|
const long ALT_MASK = 0x00000001;
|
|
|
|
const long CONTROL_MASK = 0x00000002;
|
|
|
|
const long SHIFT_MASK = 0x00000004;
|
|
|
|
const long META_MASK = 0x00000008;
|
|
|
|
|
2018-04-20 04:49:30 +00:00
|
|
|
/** The original target of the event, before any retargetings. */
|
2013-03-09 11:34:29 +00:00
|
|
|
readonly attribute EventTarget? originalTarget;
|
2018-04-20 04:49:30 +00:00
|
|
|
/**
|
|
|
|
* The explicit original target of the event. If the event was retargeted
|
|
|
|
* for some reason other than an anonymous boundary crossing, this will be set
|
|
|
|
* to the target before the retargeting occurs. For example, mouse events
|
|
|
|
* are retargeted to their parent node when they happen over text nodes (bug
|
|
|
|
* 185889), and in that case .target will show the parent and
|
|
|
|
* .explicitOriginalTarget will show the text node.
|
|
|
|
* .explicitOriginalTarget differs from .originalTarget in that it will never
|
|
|
|
* contain anonymous content.
|
|
|
|
*/
|
2013-03-09 11:34:29 +00:00
|
|
|
readonly attribute EventTarget? explicitOriginalTarget;
|
2015-01-23 11:55:46 +00:00
|
|
|
[ChromeOnly] readonly attribute EventTarget? composedTarget;
|
2022-09-21 07:44:58 +00:00
|
|
|
[ChromeOnly] undefined preventMultipleActions();
|
2013-03-12 11:28:17 +00:00
|
|
|
[ChromeOnly] readonly attribute boolean multipleActionsPrevented;
|
2014-01-15 14:28:04 +00:00
|
|
|
[ChromeOnly] readonly attribute boolean isSynthesized;
|
2021-02-27 03:02:23 +00:00
|
|
|
/**
|
|
|
|
* When the event target is a remote browser, calling this will fire an
|
|
|
|
* reply event in the chrome process.
|
|
|
|
*/
|
2022-09-21 07:44:58 +00:00
|
|
|
[ChromeOnly] undefined requestReplyFromRemoteContent();
|
2021-02-27 03:02:23 +00:00
|
|
|
/**
|
|
|
|
* Returns true when the event shouldn't be handled by chrome.
|
|
|
|
*/
|
|
|
|
[ChromeOnly] readonly attribute boolean isWaitingReplyFromRemoteContent;
|
|
|
|
/**
|
|
|
|
* Returns true when the event is a reply event from a remote process.
|
|
|
|
*/
|
|
|
|
[ChromeOnly] readonly attribute boolean isReplyEventFromRemoteContent;
|
2013-03-09 11:34:29 +00:00
|
|
|
};
|
|
|
|
|
2012-03-31 04:42:20 +00:00
|
|
|
dictionary EventInit {
|
2013-03-09 11:34:29 +00:00
|
|
|
boolean bubbles = false;
|
|
|
|
boolean cancelable = false;
|
2016-08-31 03:16:11 +00:00
|
|
|
boolean composed = false;
|
2012-03-31 04:42:20 +00:00
|
|
|
};
|