Index: tools/dom/templates/html/impl/impl_WheelEvent.darttemplate |
diff --git a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate |
index 1ce11692f5e9be0576c67d7fd5125b38da2ed3d8..c49d8f6b20151666a60e45e2472c7dc6c1aca5be 100644 |
--- a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate |
+++ b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate |
@@ -134,6 +134,15 @@ $if DART2JS |
'deltaX is not supported'); |
} |
+ @DomName('WheelEvent.deltaMode') |
+ int get deltaMode { |
+ if (JS('bool', '!!(#.deltaMode)', this)) { |
+ return JS('int', '#.deltaMode', this); |
+ } |
+ // If not available then we're poly-filling and doing pixel scroll. |
+ return 0; |
+ } |
+ |
num get _deltaY => JS('num', '#.deltaY', this); |
num get _deltaX => JS('num', '#.deltaX', this); |
num get _wheelDelta => JS('num', '#.wheelDelta', this); |
@@ -188,6 +197,5 @@ $else |
num get deltaX => $dom_wheelDeltaX; |
@DomName('WheelEvent.deltaY') |
num get deltaY => $dom_wheelDeltaY; |
- |
$endif |
} |