// Run on initial load document.addEventListener('livewire:load', function () { initializeWidget(); }); // Run after each Livewire update document.addEventListener('livewire:update', function () { initializeWidget(); });