Files
pai-companion-voice-widget-…/www/app.js
nonna 92d79a7d45 Fix WebSocket never connecting due to init race condition
Neutralino.init() establishes an internal WebSocket asynchronously.
Calling storage.getData() before the "ready" event fires could stall
silently, meaning init() never reached connect(). Also, "ready" can
fire before DOMContentLoaded, so DOM refs would be null.

Fix: wait for both "ready" AND DOMContentLoaded before calling init(),
guaranteeing native APIs and DOM are both available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 00:26:41 +00:00

10 KiB