x-data no match in html element #1656
-
hi, originallu in my page i had
and in the script section now following the documentation i changed in whith but i receive this error in console Uncaught TypeError: el.matches is not a function can you help me ? i didn't understand what is wrong |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
x-data
can't be on thehtml
tag. Is there a specific reason you need it there? Typically the "Alpine way" is to put it only where you need it so that you don't spend time walking the DOM tracking everything, but if you just need to get upgraded, it should work on the body tag