Neeko
Neeko
Explore posts from servers
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
Yes, I think I will do that 🙂 Thank you !
24 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
Oh ok, I just want to watch isScrolling on entire site ^^
24 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
@Sr. Full Stack Dev Oh god! Thanks! ❤️ Not more error but I don't see console.log('Scrolling ...'); maybe useScroll don't take the global html element?
24 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
Sure! I have this :
modules: [
'@nuxtjs/color-mode',
'@vueuse/nuxt',
'nuxt-icon'
],
modules: [
'@nuxtjs/color-mode',
'@vueuse/nuxt',
'nuxt-icon'
],
24 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
The complete code in component :
<script setup>
const el = ref<HTMLElement | null>(null)
const { isScrolling } = useScroll(el)

watch(isScrolling, () => {
console.log('Scrolling ...');
});
</script>
<script setup>
const el = ref<HTMLElement | null>(null)
const { isScrolling } = useScroll(el)

watch(isScrolling, () => {
console.log('Scrolling ...');
});
</script>
Error :
[nuxt] error caught during app initialization ReferenceError: HTMLElement is not defined ...
[nuxt] error caught during app initialization ReferenceError: HTMLElement is not defined ...
SSR related error? But how can fix? 🙂
24 replies
NNuxt
Created by Neeko on 3/6/2023 in #❓・help
HTMLElement is not defined - VueUse
The last : 3.2.3
24 replies