You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CSP build: wire:click="delete" fails, reserved words can't be used as method names #4904
In the CSP-safe build, reserved words like delete, new, true, null, undefined etc. cannot be used as property or method names after a . or as object literal keys, even though this is valid in normal JavaScript.
This breaks Livewire's wire:click="delete" directive, which Alpine/Livewire's integration compiles down to x-on:click="$wire.delete", calling .delete on $wire fails to parse under CSP.
Code snippets to reproduce the issue
With the CSP build, this throws a parse error instead of calling the method.
Activity