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

Side by Side Diff: tools/dom/templates/html/impl/impl_UIEvent.darttemplate

Issue 23455033: Fully polyfill KeyEvent so that you can programmatically create your own "keyboard" events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 // WARNING: Do not edit - generated code. 5 // WARNING: Do not edit - generated code.
6 6
7 part of $LIBRARYNAME; 7 part of $LIBRARYNAME;
8 8
9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 9 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
10 // In JS, canBubble and cancelable are technically required parameters to 10 // In JS, canBubble and cancelable are technically required parameters to
11 // init*Event. In practice, though, if they aren't provided they simply 11 // init*Event. In practice, though, if they aren't provided they simply
12 // default to false (since that's Boolean(undefined)). 12 // default to false (since that's Boolean(undefined)).
13 // 13 //
14 // Contrary to JS, we default canBubble and cancelable to true, since that's 14 // Contrary to JS, we default canBubble and cancelable to true, since that's
15 // what people want most of the time anyway. 15 // what people want most of the time anyway.
16 factory $CLASSNAME(String type, 16 factory $CLASSNAME(String type,
17 {Window view, int detail: 0, bool canBubble: true, 17 {Window view, int detail: 0, bool canBubble: true,
18 bool cancelable: true}) { 18 bool cancelable: true}) {
19 if (view == null) { 19 if (view == null) {
20 view = window; 20 view = window;
21 } 21 }
22 final e = document._createEvent("UIEvent"); 22 final e = document._createEvent("UIEvent");
23 e._initUIEvent(type, canBubble, cancelable, view, detail); 23 e._initUIEvent(type, canBubble, cancelable, view, detail);
24 return e; 24 return e;
25 } 25 }
26
27 $CLASSNAME._private() : super._private();
26 $!MEMBERS 28 $!MEMBERS
27 29
28 @deprecated 30 @deprecated
29 int get layerX => layer.x; 31 int get layerX => layer.x;
30 @deprecated 32 @deprecated
31 int get layerY => layer.y; 33 int get layerY => layer.y;
32 34
33 @deprecated 35 @deprecated
34 int get pageX => page.x; 36 int get pageX => page.x;
35 @deprecated 37 @deprecated
36 int get pageY => page.y; 38 int get pageY => page.y;
37 39
38 @DomName('UIEvent.layerX') 40 @DomName('UIEvent.layerX')
39 @DomName('UIEvent.layerY') 41 @DomName('UIEvent.layerY')
40 Point get layer => new Point(_layerX, _layerY); 42 Point get layer => new Point(_layerX, _layerY);
41 43
42 @DomName('UIEvent.pageX') 44 @DomName('UIEvent.pageX')
43 @DomName('UIEvent.pageY') 45 @DomName('UIEvent.pageY')
44 Point get page => new Point(_pageX, _pageY); 46 Point get page => new Point(_pageX, _pageY);
45 } 47 }
OLDNEW
« tools/dom/src/dart2js_KeyEvent.dart ('K') | « tools/dom/templates/html/impl/impl_Event.darttemplate ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698