I want to test if the document is NOT scrollable, by using
$el = document.documentElement
const noscroll = $el.clientHeight === $el.scrollHeight // false
console.log($el.clientHeight) // 977
console.log($el.scrollHeight) // 991
console.log($el.scrollTop) // 0
But there is no visible scroll bar in the window. Not sure why it's not working. I also tried this, but no luck.
Put in more context here:
this.getData().then(data => {
this.$nextTick().then(() => {
const $el = document.documentElement
if (!this.isPageEnd && $el.clientHeight - $el.scrollTop === $el.scrollHeight) {
this.getData()
}
})
})