michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.w3.org/TR/2012/WD-dom-20120105/ michael@0: * michael@0: * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C michael@0: * liability, trademark and document use rules apply. michael@0: */ michael@0: michael@0: [Constructor(DOMString type, optional EventInit eventInitDict)] michael@0: interface Event { michael@0: [Pure] michael@0: readonly attribute DOMString type; michael@0: [Pure] michael@0: readonly attribute EventTarget? target; michael@0: [Pure] michael@0: readonly attribute EventTarget? currentTarget; michael@0: michael@0: const unsigned short NONE = 0; michael@0: const unsigned short CAPTURING_PHASE = 1; michael@0: const unsigned short AT_TARGET = 2; michael@0: const unsigned short BUBBLING_PHASE = 3; michael@0: [Pure] michael@0: readonly attribute unsigned short eventPhase; michael@0: michael@0: void stopPropagation(); michael@0: void stopImmediatePropagation(); michael@0: michael@0: [Pure] michael@0: readonly attribute boolean bubbles; michael@0: [Pure] michael@0: readonly attribute boolean cancelable; michael@0: void preventDefault(); michael@0: [Pure] michael@0: readonly attribute boolean defaultPrevented; michael@0: michael@0: [Unforgeable, Pure] michael@0: readonly attribute boolean isTrusted; michael@0: [Pure] michael@0: readonly attribute DOMTimeStamp timeStamp; michael@0: michael@0: [Throws] michael@0: void initEvent(DOMString type, boolean bubbles, boolean cancelable); michael@0: }; michael@0: michael@0: // Mozilla specific legacy stuff. michael@0: partial interface Event { michael@0: const long ALT_MASK = 0x00000001; michael@0: const long CONTROL_MASK = 0x00000002; michael@0: const long SHIFT_MASK = 0x00000004; michael@0: const long META_MASK = 0x00000008; michael@0: michael@0: readonly attribute EventTarget? originalTarget; michael@0: readonly attribute EventTarget? explicitOriginalTarget; michael@0: [ChromeOnly] readonly attribute boolean multipleActionsPrevented; michael@0: [ChromeOnly] readonly attribute boolean isSynthesized; michael@0: michael@0: boolean getPreventDefault(); michael@0: }; michael@0: michael@0: dictionary EventInit { michael@0: boolean bubbles = false; michael@0: boolean cancelable = false; michael@0: }; michael@0: