Skip to content

End pageController.js on a cloneable value for Firefox - #3

Open
InventivetalentDev wants to merge 1 commit into
masterfrom
claude/zealous-meitner-fm8fqa
Open

InventivetalentDev wants to merge 1 commit into
masterfrom
claude/zealous-meitner-fm8fqa

Conversation

@InventivetalentDev

@InventivetalentDev InventivetalentDev commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Part of adding Firefox support to the browser extension (RemoteSlide/RemoteSlide-Chrome#5).

Problem

The extension injects pageController.js with chrome.scripting.executeScript(), which hands the script's completion value back to the caller. The last statement was socket.connect(...), so that value was the socket object.

  • Chrome quietly turns a value it can't structure-clone into null.
  • Firefox rejects the whole executeScript() call ("result is non-structured-clonable data").

The script itself had already run, so the session was joined and key presses worked. But the popup's promise chain stopped there and never sent inject_controller, so in Firefox the overlay, laser pointer and calibration marks never loaded.

Change

pageController.js now ends on a plain undefined; statement, with a comment explaining why. The bookmarklet doesn't use the completion value, so it is unaffected.

Testing

Checked end to end with the extension against a local copy of the site:

  • Firefox 158 and ESR 140: before this change, the executeScript() call rejected and the overlay didn't load. After it, the call resolves, and the overlay and laser dot load.
  • Chromium 141: unchanged; the result is now null instead of a dropped socket.

Merging

Please merge with a merge commit (as #2 was), not squash. The extension's inject/controller submodule in RemoteSlide/RemoteSlide-Chrome#5 points at this branch's commit 7f11f75. A squash merge plus branch deletion would leave that commit unreachable, and fresh clones of the extension would fail. If you do squash, repoint the extension's submodule at the squashed commit before merging its PR.

The website's static/inject/controller (RemoteSlide/remote-sli.de#11) is deliberately not bumped, since the bookmarklet doesn't need the fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01P3g3vcYRESg89oZuTf7eP5

The extension injects this file with scripting.executeScript(), which hands
the script's completion value back to the caller. That value was the socket
returned by socket.connect(). Chrome quietly turns a value it can't
structure-clone into null. Firefox rejects the whole executeScript() call
instead ("result is non-structured-clonable data"), so the popup never got
to send inject_controller, and the overlay, laser pointer and calibration
marks never loaded. The script itself had already run, so the session was
joined and key presses still worked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P3g3vcYRESg89oZuTf7eP5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants