I'm attempting to utilize computed or watch to identify changes in the body's scrollHeight, but for some reason it is not functioning properly.
Below is my code snippet:
computed: {
bodyScrollHeight() {
return document.body.scrollHeight;
}
},
watch:{
bodyScrollHeight: function(newValue) {
this.watchScrollHeight = newValue;
this.myFunction(newValue);
}
},
Link to CodePen Demo: https://codepen.io/chhoher/pen/wvMoLOg