| Index: sdk/lib/html/dartium/html_dartium.dart
|
| diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
|
| index fbe12b7ebf314a721ad55c8fcbc70f4d5087a426..fac0395e5f3d11aad293fc21f4278318fa419696 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -8990,6 +8990,13 @@ abstract class Element extends Node implements ElementTraversal {
|
| TemplateElement.decorate(this);
|
| }
|
|
|
| + /** Provides the coordinates of the element relative to the document. */
|
| + Point get documentOffset() {
|
| + final docElem = document.documentElement;
|
| + final box = getBoundingClientRect();
|
| + return new Point(box.left + window.pageXOffset - docElem.clientLeft,
|
| + box.top + window.pageYOffset - docElem.clientTop);
|
| + }
|
| // To suppress missing implicit constructor warnings.
|
| factory Element._() { throw new UnsupportedError("Not supported"); }
|
|
|
|
|