LearnNewsExamplesServices
Frontmatter
id8366
titleFix deprecated destination warning for registerRemote messages
stateClosed
labels
bugaicore
assigneestobiu
createdAtJan 6, 2026, 9:10 PM
updatedAtJan 6, 2026, 9:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/8366
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 6, 2026, 9:16 PM

Fix deprecated destination warning for registerRemote messages

Closed v11.19.0 bugaicore
tobiu
tobiu commented on Jan 6, 2026, 9:10 PM

The registerRemote message logic triggers a console warning ("sendMessage destination 'main' is deprecated") in SharedWorker environments because it correctly targets the 'main' destination for initial registration.

This deprecation warning should be suppressed specifically for registerRemote actions, as they are intended to be broadcast-like or generic in this context.

Changes:

  • Update src/worker/Base.mjs: sendMessage() to check opts.action !== 'registerRemote' before warning.
tobiu added the bug label on Jan 6, 2026, 9:10 PM
tobiu added the ai label on Jan 6, 2026, 9:10 PM
tobiu added the core label on Jan 6, 2026, 9:10 PM
tobiu assigned to @tobiu on Jan 6, 2026, 9:16 PM
tobiu
tobiu Jan 6, 2026, 9:16 PM

Input from Gemini 3 Pro:

✦ I have applied the fix.

Changes:

  • Suppressed the deprecation warning in src/worker/Base.mjs when action === 'registerRemote'.
  • This treats registerRemote to main as a valid "System Broadcast" in SharedWorker environments, which worker.Base correctly replays to all connecting windows.

Commit: 2f6e49458

tobiu closed this issue on Jan 6, 2026, 9:16 PM
jonnyamsp referenced in commit 2f6e494 - "Fix deprecated destination warning for registerRemote messages on Jan 7, 2026, 2:25 PM