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

Unified Diff: tools/dom/templates/html/impl/impl_Event.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_Event.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_Event.darttemplate b/tools/dom/templates/html/impl/impl_Event.darttemplate
index 41d047be40a5d2145a7bbdb94fea990928a121d1..b9b7b4ce55c990527db00dd65f9ecc12f65fea10 100644
--- a/tools/dom/templates/html/impl/impl_Event.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Event.darttemplate
@@ -14,8 +14,9 @@ $(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,
- [bool canBubble = true, bool cancelable = true]) {
- return new Event.eventType('Event', type, canBubble, cancelable);
+ {bool canBubble: true, bool cancelable: true}) {
+ return new Event.eventType('Event', type, canBubble: canBubble,
+ cancelable: canBubble);
}
/**
@@ -26,8 +27,8 @@ $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
*
* var e = new Event.type('MouseEvent', 'mousedown', true, true);
*/
- factory Event.eventType(String type, String name, [bool canBubble = true,
- bool cancelable = true]) {
+ factory Event.eventType(String type, String name, {bool canBubble: true,
+ bool cancelable: true}) {
final Event e = document.$dom_createEvent(type);
e.$dom_initEvent(name, canBubble, cancelable);
return e;

Powered by Google App Engine
This is Rietveld 408576698