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

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 12247002: Adding event type getter to EventStreamProvider. (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:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 3ff88831fd47ef6083fa76cdfcaf56b576a36a3f..692977d356ac8e686aa89d5e81611e4f04f8ec64 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -30849,6 +30849,17 @@ class EventStreamProvider<T extends Event> {
Stream<T> forTarget(EventTarget e, {bool useCapture: false}) {
return new _EventStream(e, _eventType, useCapture);
}
+
+ /**
+ * Gets the type of the event which this would listen for on the specified
+ * event target.
+ *
+ * The target is necessary because some browsers may use different event names
+ * for the same purpose and the target allows differentiating browser support.
+ */
+ String getEventType(EventTarget target) {
+ return _eventType;
+ }
}
/**
@@ -30864,6 +30875,10 @@ class _CustomEventStreamProvider<T extends Event>
Stream<T> forTarget(EventTarget e, {bool useCapture: false}) {
return new _EventStream(e, _eventTypeGetter(e), useCapture);
}
+
+ String getEventType(EventTarget target) {
+ return _eventTypeGetter(target);
+ }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698