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

Unified Diff: tools/dom/templates/html/impl/impl_UIEvent.darttemplate

Issue 12025027: Cleaning up event constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: tools/dom/templates/html/impl/impl_UIEvent.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
index 504671a0f639971feafe493271a5a4a9637e153b..939ce85cf614b69cdcaa38d498a02aef3f9f4767 100644
--- a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
@@ -13,8 +13,12 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory $CLASSNAME(String type, Window view, int detail,
- [bool canBubble = true, bool cancelable = true]) {
+ factory $CLASSNAME(String type,
+ {Window view, int detail: 0, bool canBubble: true,
+ bool cancelable: true}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("UIEvent");
e.$dom_initUIEvent(type, canBubble, cancelable, view, detail);
return e;

Powered by Google App Engine
This is Rietveld 408576698