(e)
| 736 | |
| 737 | // Returns the scroll offset of the given element. |
| 738 | function getScroll(e) { |
| 739 | if (e == htmlElem) { |
| 740 | return new goog.dom.DomHelper(ownerDoc).getDocumentScroll(); |
| 741 | } else { |
| 742 | return new goog.math.Coordinate(e.scrollLeft, e.scrollTop); |
| 743 | } |
| 744 | } |
| 745 | |
| 746 | // Check if the element overflows any ancestor element. |
| 747 | for (var container = getOverflowParent(elem); |