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 76c931f152c3779e79d7b246d2f07cb351614203..9fddd1c56b5a5d99b7f5bc8c4f02cb4f6178b5d8 100644 |
--- a/tools/dom/templates/html/impl/impl_Event.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_Event.darttemplate |
@@ -13,24 +13,7 @@ $(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.type('Event', type, canBubble, cancelable); |
- } |
- |
- /** |
- * Creates a new Event object of the specified type. |
- * |
- * This is analogous to document.createEvent. |
- * Normally events should be created via their constructors, if available. |
- * |
- * var e = new Event.type('MouseEvent', 'mousedown', true, true); |
- */ |
- factory Event.type(String eventType, String name, [bool canBubble = true, |
- bool cancelable = true]) { |
- final Event e = document.$dom_createEvent(eventType); |
- e.$dom_initEvent(name, canBubble, cancelable); |
- return e; |
- } |
+ factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true]) => |
+ _$(CLASSNAME)FactoryProvider.create$CLASSNAME(type, canBubble, cancelable); |
$!MEMBERS |
} |