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