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

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

Issue 20385002: Added shim for scrollX and scrollY for IE 9. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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') | sdk/lib/html/dartium/html_dartium.dart » ('J')
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 a4f487cfd8b5f175873d3ba5c54ef3a753dd06cc..5442f059a0df8388476a56ab8932c936216c6a48 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -24393,13 +24393,15 @@ class Window extends EventTarget implements WindowBase, WindowTimers native "Win
@DocsEditable()
final int screenY;
+ @JSName('scrollX')
@DomName('Window.scrollX')
@DocsEditable()
- final int scrollX;
+ final int $dom_scrollX;
+ @JSName('scrollY')
@DomName('Window.scrollY')
@DocsEditable()
- final int scrollY;
+ final int $dom_scrollY;
@DomName('Window.scrollbars')
@DocsEditable()
@@ -24966,6 +24968,11 @@ class Window extends EventTarget implements WindowBase, WindowTimers native "Win
void moveTo(Point p) {
$dom_moveTo(p.x, p.y);
}
+
+ int get scrollX => JS('int',
+ '#.scrollX || document.documentElement.scrollLeft', this);
+ int get scrollY => JS('int',
+ '#.scrollY || document.documentElement.scrollTop', this);
}
/**
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | sdk/lib/html/dartium/html_dartium.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698