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

Unified Diff: tools/dom/templates/html/dartium/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
« no previous file with comments | « tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
diff --git a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
index ff542eb7078326cfaaf971162c07e24c26502d10..2f30bd1c63a5f31b4945b26e336b9066c52aab13 100644
--- a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
@@ -6,11 +6,14 @@ part of $LIBRARYNAME;
$(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 | « tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698