- From: Mike Sherov <notifications@github.com>
- Date: Thu, 23 Apr 2015 14:24:15 -0700
- To: w3ctag/spec-reviews <spec-reviews@noreply.github.com>
- Message-ID: <w3ctag/spec-reviews/issues/51/95722694@github.com>
@RByers Again, I'm a layman, so please just take my comments as feedback. I've also been trying to solve this problem for a while on behalf of jQuery, and this is as close as we've ever gotten to a solution....
what about a boolean property rather than an additional reference to document.documentElement? I think @domenic and my (layman) main objection is about yet another property referring to the same underlying element. Perhaps `document.documentElement.isScrollingElement`?
This would look like:
```
function getScrollingElement() {
    if (document.documentElement.isScrollingElement) {
        return document.documentElement;
    }
    return /* whatever UA check they use now */;
}
```
You'd also have the benefit of querying an element to see if it is the scrolling element without having to compare it to another element:
```
function isScrollingElement(element) {
  if ("isScrollingElement" in element) {
    return element.isScrollingElement;
  }
  return /*some UA check */;
}
```
---
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/spec-reviews/issues/51#issuecomment-95722694
Received on Thursday, 23 April 2015 21:24:45 UTC