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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 6 $(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
7 7
8 factory $CLASSNAME(String type, Window view, 8 factory $CLASSNAME(String type,
9 [bool canBubble = true, bool cancelable = true, 9 {Window view, bool canBubble: true, bool cancelable: true,
10 String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false, 10 String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
11 bool altKey = false, bool shiftKey = false, bool metaKey = false, 11 bool altKey: false, bool shiftKey: false, bool metaKey: false,
12 bool altGraphKey = false]) { 12 bool altGraphKey: false}) {
13 if (view == null) {
14 view = window;
15 }
13 final e = document.$dom_createEvent("KeyboardEvent"); 16 final e = document.$dom_createEvent("KeyboardEvent");
14 e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, 17 e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
15 keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey); 18 keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
16 return e; 19 return e;
17 } 20 }
18 21
19 @DomName('KeyboardEvent.initKeyboardEvent') 22 @DomName('KeyboardEvent.initKeyboardEvent')
20 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, 23 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
21 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, 24 Window view, String keyIdentifier, int keyLocation, bool ctrlKey,
22 bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) { 25 bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) {
(...skipping 13 matching lines...) Expand all
36 } 39 }
37 } 40 }
38 41
39 @DomName('KeyboardEvent.keyCode') 42 @DomName('KeyboardEvent.keyCode')
40 int get keyCode => $dom_keyCode; 43 int get keyCode => $dom_keyCode;
41 44
42 @DomName('KeyboardEvent.charCode') 45 @DomName('KeyboardEvent.charCode')
43 int get charCode => $dom_charCode; 46 int get charCode => $dom_charCode;
44 $!MEMBERS 47 $!MEMBERS
45 } 48 }
OLDNEW
« 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