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

Unified Diff: lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate

Issue 10969073: Fixing up WheelEvent to follow W3C standards and work on all platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporating review feedback Created 8 years, 3 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 | « lib/html/src/Device.dart ('k') | lib/html/templates/html/impl/impl_WheelEvent.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
diff --git a/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate b/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
new file mode 100644
index 0000000000000000000000000000000000000000..41de3d780e9fe9bc34ffb38cf1a2621b77b077c7
--- /dev/null
+++ b/lib/html/templates/html/dart2js/impl_ElementEvents.darttemplate
@@ -0,0 +1,20 @@
+// 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
+// BSD-style license that can be found in the LICENSE file.
+
+class $CLASSNAME extends $SUPER implements $INTERFACE {
+ $CLASSNAME(_ptr) : super(_ptr);
+$!MEMBERS
+ EventListenerList get mouseWheel {
+ if (JS('bool', '#.onwheel !== undefined', _ptr)) {
+ // W3C spec, and should be IE9+, but IE has a bug exposing onwheel.
+ return this['wheel'];
+ } else if (JS('bool', '#.onmousewheel !== undefined', _ptr)) {
+ // Chrome & IE
+ return this['mousewheel'];
+ } else {
+ // Firefox
+ return this['DOMMouseScroll'];
+ }
+ }
+}
« no previous file with comments | « lib/html/src/Device.dart ('k') | lib/html/templates/html/impl/impl_WheelEvent.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698