W3cubDocs

/Dart 2

offsetTo method

Point<num> offsetTo (Element parent)

Provides the offset of this element's borderEdge relative to the specified parent.

This is the Dart equivalent of jQuery's position method. Unlike jQuery's position, however, parent can be any parent element of this, rather than only this's immediate offsetParent. If the specified element is not an offset parent or transitive offset parent to this element, an ArgumentError is thrown.

Implementation

Point offsetTo(Element parent) {
  return Element._offsetToHelper(this, parent);
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/Element/offsetTo.html