offsetTo method

  1. @Experimental()
Point 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.

Source

@Experimental()
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/1.24.3/dart-html/Element/offsetTo.html