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

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

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:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.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 1630878110b9cb4978c19215865912a37fe98437..7451aa58d959e8c447095985f5f939fe773493f2 100644
--- a/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
+++ b/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
@@ -54,10 +54,29 @@ class Events {
class ElementEvents extends Events {
/* Raw event target. */
final Element _ptr;
+ static final webkitEvents = {
+ 'fullscreenchange' : 'onwebkitfullscreenchange',
blois 2013/10/19 01:19:10 the on prefix should not be there.
Emily Fortuna 2013/10/21 17:43:51 Done.
+ 'fullscreenerror' : 'onwebkitfullscreenerror',
+ 'pointerlockchange' : 'onwebkitpointerlockchange',
+ 'pointerlockerror' : 'onwebkitpointerlockerror',
+ 'keyadded' : 'onwebkitkeyadded',
blois 2013/10/19 01:19:10 Can we only add the webkit prefix on webkit browse
Emily Fortuna 2013/10/21 17:43:51 Done.
+ 'keyerror' : 'onwebkitkeyerror',
+ 'keymessage' : 'onwebkitkeymessage',
+ 'needkey' : 'onwebkitneedkey',
+ 'resourcetimingbufferfull' : 'onwebkitresourcetimingbufferfull',
blois 2013/10/19 01:19:10 Looking at this list, there are more renames- http
Emily Fortuna 2013/10/21 17:43:51 I think those other events much have gone away. I
+ 'animationend' : 'onwebkitAnimationEnd',
+ 'animationiteration' : 'onwebkitAnimationIteration',
+ 'animationstart' : 'onwebkitAnimationStart',
Emily Fortuna 2013/10/19 00:57:31 it seemed unrealistic to expect the user to know t
+ 'speechchange' : 'onwebkitSpeechChange'
+ };
ElementEvents(Element ptr) : this._ptr = ptr, super(ptr);
Stream operator [](String type) {
+ if (type.toLowerCase() in webkitEvents.keys) {
+ return new _ElementEventStreamImpl(
+ _ptr, webkitEvents[type.toLowerCase()], false);
+ }
return new _ElementEventStreamImpl(_ptr, type, false);
}
}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698