dom/webidl/Event.webidl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 4 * You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5 *
michael@0 6 * The origin of this IDL file is
michael@0 7 * http://www.w3.org/TR/2012/WD-dom-20120105/
michael@0 8 *
michael@0 9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
michael@0 10 * liability, trademark and document use rules apply.
michael@0 11 */
michael@0 12
michael@0 13 [Constructor(DOMString type, optional EventInit eventInitDict)]
michael@0 14 interface Event {
michael@0 15 [Pure]
michael@0 16 readonly attribute DOMString type;
michael@0 17 [Pure]
michael@0 18 readonly attribute EventTarget? target;
michael@0 19 [Pure]
michael@0 20 readonly attribute EventTarget? currentTarget;
michael@0 21
michael@0 22 const unsigned short NONE = 0;
michael@0 23 const unsigned short CAPTURING_PHASE = 1;
michael@0 24 const unsigned short AT_TARGET = 2;
michael@0 25 const unsigned short BUBBLING_PHASE = 3;
michael@0 26 [Pure]
michael@0 27 readonly attribute unsigned short eventPhase;
michael@0 28
michael@0 29 void stopPropagation();
michael@0 30 void stopImmediatePropagation();
michael@0 31
michael@0 32 [Pure]
michael@0 33 readonly attribute boolean bubbles;
michael@0 34 [Pure]
michael@0 35 readonly attribute boolean cancelable;
michael@0 36 void preventDefault();
michael@0 37 [Pure]
michael@0 38 readonly attribute boolean defaultPrevented;
michael@0 39
michael@0 40 [Unforgeable, Pure]
michael@0 41 readonly attribute boolean isTrusted;
michael@0 42 [Pure]
michael@0 43 readonly attribute DOMTimeStamp timeStamp;
michael@0 44
michael@0 45 [Throws]
michael@0 46 void initEvent(DOMString type, boolean bubbles, boolean cancelable);
michael@0 47 };
michael@0 48
michael@0 49 // Mozilla specific legacy stuff.
michael@0 50 partial interface Event {
michael@0 51 const long ALT_MASK = 0x00000001;
michael@0 52 const long CONTROL_MASK = 0x00000002;
michael@0 53 const long SHIFT_MASK = 0x00000004;
michael@0 54 const long META_MASK = 0x00000008;
michael@0 55
michael@0 56 readonly attribute EventTarget? originalTarget;
michael@0 57 readonly attribute EventTarget? explicitOriginalTarget;
michael@0 58 [ChromeOnly] readonly attribute boolean multipleActionsPrevented;
michael@0 59 [ChromeOnly] readonly attribute boolean isSynthesized;
michael@0 60
michael@0 61 boolean getPreventDefault();
michael@0 62 };
michael@0 63
michael@0 64 dictionary EventInit {
michael@0 65 boolean bubbles = false;
michael@0 66 boolean cancelable = false;
michael@0 67 };
michael@0 68

mercurial