| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 interface Event default EventWrappingImplementation { | |
| 6 | |
| 7 static final int AT_TARGET = 2; | |
| 8 | |
| 9 static final int BLUR = 8192; | |
| 10 | |
| 11 static final int BUBBLING_PHASE = 3; | |
| 12 | |
| 13 static final int CAPTURING_PHASE = 1; | |
| 14 | |
| 15 static final int CHANGE = 32768; | |
| 16 | |
| 17 static final int CLICK = 64; | |
| 18 | |
| 19 static final int DBLCLICK = 128; | |
| 20 | |
| 21 static final int DRAGDROP = 2048; | |
| 22 | |
| 23 static final int FOCUS = 4096; | |
| 24 | |
| 25 static final int KEYDOWN = 256; | |
| 26 | |
| 27 static final int KEYPRESS = 1024; | |
| 28 | |
| 29 static final int KEYUP = 512; | |
| 30 | |
| 31 static final int MOUSEDOWN = 1; | |
| 32 | |
| 33 static final int MOUSEDRAG = 32; | |
| 34 | |
| 35 static final int MOUSEMOVE = 16; | |
| 36 | |
| 37 static final int MOUSEOUT = 8; | |
| 38 | |
| 39 static final int MOUSEOVER = 4; | |
| 40 | |
| 41 static final int MOUSEUP = 2; | |
| 42 | |
| 43 static final int SELECT = 16384; | |
| 44 | |
| 45 // In JS, canBubble and cancelable are technically required parameters to | |
| 46 // init*Event. In practice, though, if they aren't provided they simply | |
| 47 // default to false (since that's Boolean(undefined)). | |
| 48 // | |
| 49 // Contrary to JS, we default canBubble and cancelable to true, since that's | |
| 50 // what people want most of the time anyway. | |
| 51 Event(String type, [bool canBubble, bool cancelable]); | |
| 52 | |
| 53 bool get bubbles(); | |
| 54 | |
| 55 bool get cancelBubble(); | |
| 56 | |
| 57 void set cancelBubble(bool value); | |
| 58 | |
| 59 bool get cancelable(); | |
| 60 | |
| 61 EventTarget get currentTarget(); | |
| 62 | |
| 63 bool get defaultPrevented(); | |
| 64 | |
| 65 int get eventPhase(); | |
| 66 | |
| 67 bool get returnValue(); | |
| 68 | |
| 69 void set returnValue(bool value); | |
| 70 | |
| 71 EventTarget get srcElement(); | |
| 72 | |
| 73 EventTarget get target(); | |
| 74 | |
| 75 int get timeStamp(); | |
| 76 | |
| 77 String get type(); | |
| 78 | |
| 79 void preventDefault(); | |
| 80 | |
| 81 void stopImmediatePropagation(); | |
| 82 | |
| 83 void stopPropagation(); | |
| 84 } | |
| OLD | NEW |