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

Unified Diff: sdk/lib/html/templates/html/impl/impl_UIEvent.darttemplate

Issue 11416249: Make KeyboardEvent cross-browser consistent. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: moved instance variables to constructor Created 8 years, 1 month 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: sdk/lib/html/templates/html/impl/impl_UIEvent.darttemplate
diff --git a/sdk/lib/html/templates/html/impl/impl_Event.darttemplate b/sdk/lib/html/templates/html/impl/impl_UIEvent.darttemplate
similarity index 69%
copy from sdk/lib/html/templates/html/impl/impl_Event.darttemplate
copy to sdk/lib/html/templates/html/impl/impl_UIEvent.darttemplate
index c1cf0961fa122cae2a8c1e766c24f8f949fc3d5f..ce957c8ab70952666788c879561c5ca732496d46 100644
--- a/sdk/lib/html/templates/html/impl/impl_Event.darttemplate
+++ b/sdk/lib/html/templates/html/impl/impl_UIEvent.darttemplate
@@ -6,7 +6,7 @@
part of html;
-/// @domName $DOMNAME
+/// @domName $DOMNAME; @docsEditable true
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// In JS, canBubble and cancelable are technically required parameters to
// init*Event. In practice, though, if they aren't provided they simply
@@ -14,7 +14,11 @@ 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]) =>
- _$(CLASSNAME)FactoryProvider.create$CLASSNAME(type, canBubble, cancelable);
+ factory $CLASSNAME(String type, Window view, int detail,
+ [bool canBubble = true, bool cancelable = true]) {
+ final e = document.$dom_createEvent("UIEvent");
+ e.$dom_initUIEvent(type, canBubble, cancelable, view, detail);
+ return e;
+ }
$!MEMBERS
}
« no previous file with comments | « sdk/lib/html/templates/html/dartium/impl_KeyboardEvent.darttemplate ('k') | tests/html/keyboard_event_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698