Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: client/html/src/EventWrappingImplementation.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698