how can i put script on a widget blade view?

i am going to have a widget that will run a script on its view. but no matter where I put the script it didnt work. here's my code:

<x-filament-widgets::widget>
<x-filament::section>
</x-filament::section>

<script>
alert("hey")
</script>
</x-filament-widgets::widget>

any idea why? thanks. this is a custom widget btw and i am using it on a custom page
Was this page helpful?