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

Unified Diff: client/touch/EventUtil.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Get rid of html testing stuff and fix uses of init*Event. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: client/touch/EventUtil.dart
diff --git a/client/touch/EventUtil.dart b/client/touch/EventUtil.dart
index 0ff7c0c419a228fa556d0a0319f2cc287b7cc41f..b47a8a1edf0ad390aaed097d5a1b006f3d201444 100644
--- a/client/touch/EventUtil.dart
+++ b/client/touch/EventUtil.dart
@@ -26,11 +26,8 @@ class EventUtil {
}
// TODO(jacobr): add a comment or remove this method.
- static Event createEvent(String eventType) {
- Event event = document.createEvent("HTMLEvents");
- event.initEvent(eventType, true, true);
- return event;
- }
+ static Event createEvent(String eventType) =>
Jacob 2011/10/27 23:16:05 take this a step further and kill off this now use
nweiz 2011/10/27 23:47:23 Done.
+ new Event(eventType, canBubble: true, cancelable: true);
/**
* Clear the keyboard focus of the currently focused element (if there is

Powered by Google App Engine
This is Rietveld 408576698