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

Side by Side Diff: sdk/lib/html/src/dart2js_KeyEvent.dart

Issue 11642035: Renaming Window to WindowBase and LocalWindow to Window. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 /** 1 /**
2 * A custom KeyboardEvent that attempts to eliminate cross-browser 2 * A custom KeyboardEvent that attempts to eliminate cross-browser
3 * inconsistencies, and also provide both keyCode and charCode information 3 * inconsistencies, and also provide both keyCode and charCode information
4 * for all key events (when such information can be determined). 4 * for all key events (when such information can be determined).
5 * 5 *
6 * This class is very much a work in progress, and we'd love to get information 6 * This class is very much a work in progress, and we'd love to get information
7 * on how we can make this class work with as many international keyboards as 7 * on how we can make this class work with as many international keyboards as
8 * possible. Bugs welcome! 8 * possible. Bugs welcome!
9 */ 9 */
10 class KeyEvent implements KeyboardEvent { 10 class KeyEvent implements KeyboardEvent {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 /** 89 /**
90 * The type of key event that occurred. One of "keydown", "keyup", or 90 * The type of key event that occurred. One of "keydown", "keyup", or
91 * "keypress". 91 * "keypress".
92 */ 92 */
93 String get type => _parent.type; 93 String get type => _parent.type;
94 Window get view => _parent.view; 94 Window get view => _parent.view;
95 void preventDefault() => _parent.preventDefault(); 95 void preventDefault() => _parent.preventDefault();
96 void stopImmediatePropagation() => _parent.stopImmediatePropagation(); 96 void stopImmediatePropagation() => _parent.stopImmediatePropagation();
97 void stopPropagation() => _parent.stopPropagation(); 97 void stopPropagation() => _parent.stopPropagation();
98 void $dom_initUIEvent(String type, bool canBubble, bool cancelable, 98 void $dom_initUIEvent(String type, bool canBubble, bool cancelable,
99 LocalWindow view, int detail) { 99 Window view, int detail) {
100 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent."); 100 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent.");
101 } 101 }
102 void $dom_initEvent(String eventTypeArg, bool canBubbleArg, 102 void $dom_initEvent(String eventTypeArg, bool canBubbleArg,
103 bool cancelableArg) { 103 bool cancelableArg) {
104 throw new UnsupportedError("Cannot initialize an Event from a KeyEvent."); 104 throw new UnsupportedError("Cannot initialize an Event from a KeyEvent.");
105 } 105 }
106 String get _shadowKeyIdentifier => JS('String', '#.keyIdentifier', _parent); 106 String get _shadowKeyIdentifier => JS('String', '#.keyIdentifier', _parent);
107 107
108 int get $dom_charCode => charCode; 108 int get $dom_charCode => charCode;
109 int get $dom_keyCode => keyCode; 109 int get $dom_keyCode => keyCode;
110 EventTarget get target => _parent.target; 110 EventTarget get target => _parent.target;
111 String get $dom_keyIdentifier { 111 String get $dom_keyIdentifier {
112 throw new UnsupportedError("keyIdentifier is unsupported."); 112 throw new UnsupportedError("keyIdentifier is unsupported.");
113 } 113 }
114 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, 114 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable,
115 LocalWindow view, String keyIdentifier, int keyLocation, bool ctrlKey, 115 Window view, String keyIdentifier, int keyLocation, bool ctrlKey,
116 bool altKey, bool shiftKey, bool metaKey, 116 bool altKey, bool shiftKey, bool metaKey,
117 bool altGraphKey) { 117 bool altGraphKey) {
118 throw new UnsupportedError( 118 throw new UnsupportedError(
119 "Cannot initialize a KeyboardEvent from a KeyEvent."); 119 "Cannot initialize a KeyboardEvent from a KeyEvent.");
120 } 120 }
121 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698