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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 29843004: Allow all events to be accessed via on[foo] instead of just onFoo (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:
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 ec9e4c41606952cc9122272346187a92d483c126..299dcb426ce0261f417ea7b74d5fed9f4d6a36df 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -11573,10 +11573,32 @@ class Events {
class ElementEvents extends Events {
/* Raw event target. */
final Element _ptr;
+ static final webkitEvents = {
+ 'animationend' : 'webkitAnimationEnd',
+ 'animationiteration' : 'webkitAnimationIteration',
+ 'animationstart' : 'webkitAnimationStart',
+ 'fullscreenchange' : 'webkitfullscreenchange',
+ 'fullscreenerror' : 'webkitfullscreenerror',
+ 'keyadded' : 'webkitkeyadded',
+ 'keyerror' : 'webkitkeyerror',
+ 'keymessage' : 'webkitkeymessage',
+ 'needkey' : 'webkitneedkey',
+ 'pointerlockchange' : 'webkitpointerlockchange',
+ 'pointerlockerror' : 'webkitpointerlockerror',
+ 'resourcetimingbufferfull' : 'webkitresourcetimingbufferfull',
+ 'transitionend': 'webkitTransitionEnd',
+ 'speechchange' : 'webkitSpeechChange'
+ };
ElementEvents(Element ptr) : this._ptr = ptr, super(ptr);
Stream operator [](String type) {
+ if (type.toLowerCase() in webkitEvents.keys) {
+ if (Device.isWebKit) {
+ return new _ElementEventStreamImpl(
+ _ptr, webkitEvents[type.toLowerCase()], false);
+ }
+ }
return new _ElementEventStreamImpl(_ptr, type, false);
}
}
« 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