New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to get scrollHeight property? #1013
Comments
The property itself would not be a big deal, you could even patch this quite easily yourself in the |
I just wanted to use scrollHeight to check if there is an overflow inside a div. Probably I'll have to look at PhantomJS/SlimerJS instead. Thanks for the answer. |
Is there anyway of mocking it? I tried this:
And got the error: |
@leepowellcouk Looks like you forgot to add Object.defineProperty(HTMLElement.prototype, "scrollHeight", {
configurable: true,
get: function() {
return this._scrollHeight || 0;
},
set(val) {
this._scrollHeight = val;
}
}); |
Is there a way to get a scrollHeight property (https://developer.mozilla.org/en-US/docs/Web/API/Element.scrollHeight)?
The text was updated successfully, but these errors were encountered: