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

Unified Diff: tools/dom/templates/html/impl/impl_EventTarget.darttemplate

Issue 12217124: Removing deprecated events syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/src/Isolates.dart ('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/impl/impl_EventTarget.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_EventTarget.darttemplate b/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
index e0ff57ed23123018c21dfc02f41e9b61a1da3c6a..4642dc4a041d297e658536b5704a628616ee0b0a 100644
--- a/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
+++ b/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
@@ -23,45 +23,8 @@ class Events {
Events(this._ptr);
- EventListenerList operator [](String type) {
- return new EventListenerList(_ptr, type);
- }
-}
-
-/**
- * Supports adding, removing, and dispatching events for a specific event type.
- */
-class EventListenerList {
-
- final EventTarget _ptr;
- final String _type;
-
- EventListenerList(this._ptr, this._type);
-
- // TODO(jacobr): implement equals.
-
- EventListenerList add(EventListener listener,
- [bool useCapture = false]) {
- _add(listener, useCapture);
- return this;
- }
-
- EventListenerList remove(EventListener listener,
- [bool useCapture = false]) {
- _remove(listener, useCapture);
- return this;
- }
-
- bool dispatch(Event evt) {
- return _ptr.dispatchEvent(evt);
- }
-
- void _add(EventListener listener, bool useCapture) {
- _ptr.$dom_addEventListener(_type, listener, useCapture);
- }
-
- void _remove(EventListener listener, bool useCapture) {
- _ptr.$dom_removeEventListener(_type, listener, useCapture);
+ Stream operator [](String type) {
+ return new _EventStream(_ptr, type, false);
}
}
« no previous file with comments | « tools/dom/src/Isolates.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698