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

Unified Diff: tools/dom/templates/html/impl/impl_CustomEvent.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_CustomEvent.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
index b2a7ad46d145adaa01d524fe30246bdb3c6ad1d3..2d2b6c0a8ddc74ea4bd2d4102f47ddc8f46db00f 100644
--- a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
@@ -7,8 +7,13 @@
part of html;
$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true,
- Object detail]) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(
- type, canBubble, cancelable, detail);
+ factory $CLASSNAME(String type,
+ {bool canBubble: true, bool cancelable: true, Object detail}) {
+
+ final CustomEvent e = document.$dom_createEvent("CustomEvent");
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
+
+ return e;
+ }
$!MEMBERS
}

Powered by Google App Engine
This is Rietveld 408576698