| 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 class EventWrappingImplementation extends DOMWrapperBase implements Event { |
| 6 EventWrappingImplementation._wrap(ptr) : super._wrap(ptr); |
| 7 |
| 8 factory EventWrappingImplementation(String type, [bool canBubble = true, |
| 9 bool cancelable = true]) { |
| 10 final e = dom.document.createEvent("Event"); |
| 11 e.initEvent(type, canBubble, cancelable); |
| 12 return LevelDom.wrapEvent(e); |
| 13 } |
| 14 |
| 15 bool get bubbles() => _ptr.bubbles; |
| 16 |
| 17 bool get cancelBubble() => _ptr.cancelBubble; |
| 18 |
| 19 void set cancelBubble(bool value) { _ptr.cancelBubble = value; } |
| 20 |
| 21 bool get cancelable() => _ptr.cancelable; |
| 22 |
| 23 EventTarget get currentTarget() => LevelDom.wrapEventTarget(_ptr.currentTarget
); |
| 24 |
| 25 bool get defaultPrevented() => _ptr.defaultPrevented; |
| 26 |
| 27 int get eventPhase() => _ptr.eventPhase; |
| 28 |
| 29 bool get returnValue() => _ptr.returnValue; |
| 30 |
| 31 void set returnValue(bool value) { _ptr.returnValue = value; } |
| 32 |
| 33 EventTarget get srcElement() => LevelDom.wrapEventTarget(_ptr.srcElement); |
| 34 |
| 35 EventTarget get target() => LevelDom.wrapEventTarget(_ptr.target); |
| 36 |
| 37 int get timeStamp() => _ptr.timeStamp; |
| 38 |
| 39 String get type() => _ptr.type; |
| 40 |
| 41 void preventDefault() { |
| 42 _ptr.preventDefault(); |
| 43 return; |
| 44 } |
| 45 |
| 46 void stopImmediatePropagation() { |
| 47 _ptr.stopImmediatePropagation(); |
| 48 return; |
| 49 } |
| 50 |
| 51 void stopPropagation() { |
| 52 _ptr.stopPropagation(); |
| 53 return; |
| 54 } |
| 55 } |
| OLD | NEW |