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

Unified Diff: tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate

Issue 12061004: Updating KeyboardEvent constructor to use named parameters. (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/dart2js/impl_KeyboardEvent.darttemplate
diff --git a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
index 15daf48959c748ec985f4318501552c17328a6e4..7c4b25ae14902ac86dc93f3945f52028214a035a 100644
--- a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
@@ -5,11 +5,14 @@
$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
- String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- bool altGraphKey = false]) {
+ factory $CLASSNAME(String type,
+ {Window view, bool canBubble: true, bool cancelable: true,
+ String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
+ bool altKey: false, bool shiftKey: false, bool metaKey: false,
+ bool altGraphKey: false}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("KeyboardEvent");
e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
« no previous file with comments | « tests/html/keyboard_event_test.dart ('k') | tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698