OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> | 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 // Introduced in DOM Level 2: | |
22 [ | 21 [ |
23 EventConstructor, | 22 Constructor(DOMString type, [Named] optional boolean bubbles, [Named] option
al boolean cancelable), |
24 ] interface Event { | 23 ] interface Event { |
25 // DOM PhaseType | 24 // DOM PhaseType |
26 const unsigned short NONE = 0; | 25 const unsigned short NONE = 0; |
27 const unsigned short CAPTURING_PHASE = 1; | 26 const unsigned short CAPTURING_PHASE = 1; |
28 const unsigned short AT_TARGET = 2; | 27 const unsigned short AT_TARGET = 2; |
29 const unsigned short BUBBLING_PHASE = 3; | 28 const unsigned short BUBBLING_PHASE = 3; |
30 | 29 |
31 readonly attribute DOMString type; | 30 readonly attribute DOMString type; |
32 readonly attribute EventTarget target; | 31 readonly attribute EventTarget target; |
33 readonly attribute EventTarget currentTarget; | 32 readonly attribute EventTarget currentTarget; |
34 readonly attribute unsigned short eventPhase; | 33 readonly attribute unsigned short eventPhase; |
35 [InitializedByEventConstructor] readonly attribute boolean bubbles; | 34 [InitializedByEventConstructor] readonly attribute boolean bubbles; |
36 [InitializedByEventConstructor] readonly attribute boolean cancelable; | 35 [InitializedByEventConstructor] readonly attribute boolean cancelable; |
37 readonly attribute double timeStamp; | 36 readonly attribute double timeStamp; |
38 | 37 |
39 void stopPropagation(); | 38 void stopPropagation(); |
40 void preventDefault(); | 39 void preventDefault(); |
41 void initEvent([Default=Undefined] optional DOMString eventTypeArg, | |
42 [Default=Undefined] optional boolean canBubbleArg, | |
43 [Default=Undefined] optional boolean cancelableArg); | |
44 | 40 |
45 // DOM Level 3 Additions. | 41 // DOM Level 3 Additions. |
46 readonly attribute boolean defaultPrevented; | 42 readonly attribute boolean defaultPrevented; |
47 void stopImmediatePropagation(); | 43 void stopImmediatePropagation(); |
48 | 44 |
49 // IE Extensions | 45 // IE Extensions |
50 readonly attribute EventTarget srcElement; | 46 readonly attribute EventTarget srcElement; |
51 [CallWith=ExecutionContext, ImplementedAs=legacyReturnValue] attribute boole
an returnValue; | 47 [CallWith=ExecutionContext, ImplementedAs=legacyReturnValue] attribute boole
an returnValue; |
52 attribute boolean cancelBubble; | 48 attribute boolean cancelBubble; |
53 readonly attribute NodeList path; | 49 readonly attribute NodeList path; |
54 }; | 50 }; |
OLD | NEW |