0👍
I guess the problem is that your process.client
is false.
I tried the code below and it works fine for me:
methods: {
handleScroll() {
console.log("scrolled");
},
},
created() {
window.addEventListener("scroll", this.handleScroll);
console.log(window);
},
destroyed() {
window.removeEventListener("scroll", this.handleScroll);
},
</js>
Source:stackexchange.com