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

Side by Side Diff: lib/dom/templates/html/frog/impl_EventTarget.darttemplate

Issue 10445011: Events operator [] shouldn't convert event name to lower case. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 class _EventsImpl implements Events { 5 class _EventsImpl implements Events {
6 /* Raw event target. */ 6 /* Raw event target. */
7 // TODO(jacobr): it would be nice if we could specify this as 7 // TODO(jacobr): it would be nice if we could specify this as
8 // _EventTargetImpl or EventTarget 8 // _EventTargetImpl or EventTarget
9 final Dynamic _ptr; 9 final Dynamic _ptr;
10 10
11 _EventsImpl(this._ptr); 11 _EventsImpl(this._ptr);
12 12
13 _EventListenerListImpl operator [](String type) => _get(type.toLowerCase()); 13 _EventListenerListImpl operator [](String type) {
Anton Muhin 2012/06/05 13:47:03 => syntax?
14
15 _EventListenerListImpl _get(String type) {
16 return new _EventListenerListImpl(_ptr, type); 14 return new _EventListenerListImpl(_ptr, type);
17 } 15 }
18 } 16 }
19 17
20 class _EventListenerListImpl implements EventListenerList { 18 class _EventListenerListImpl implements EventListenerList {
21 19
22 // TODO(jacobr): make this _EventTargetImpl 20 // TODO(jacobr): make this _EventTargetImpl
23 final Dynamic _ptr; 21 final Dynamic _ptr;
24 final String _type; 22 final String _type;
25 23
(...skipping 28 matching lines...) Expand all
54 _ptr.$dom_removeEventListener(_type, listener, useCapture); 52 _ptr.$dom_removeEventListener(_type, listener, useCapture);
55 } 53 }
56 } 54 }
57 55
58 56
59 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 57 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
60 58
61 Events get on() => new _EventsImpl(this); 59 Events get on() => new _EventsImpl(this);
62 $!MEMBERS 60 $!MEMBERS
63 } 61 }
OLDNEW
« no previous file with comments | « lib/dom/templates/html/dartium/impl_EventTarget.darttemplate ('k') | lib/html/frog/html_frog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698