Skip to content

Fix #1091: Add postMessage API for cross-domain terminal interaction#1468

Open
itadventurer wants to merge 2 commits intotsl0922:mainfrom
itadventurer:feature/postmessage-api
Open

Fix #1091: Add postMessage API for cross-domain terminal interaction#1468
itadventurer wants to merge 2 commits intotsl0922:mainfrom
itadventurer:feature/postmessage-api

Conversation

@itadventurer
Copy link
Copy Markdown

Fixes #1091 Enables iframe communication with terminal via postMessage: iframe.contentWindow.postMessage({type: 'terminal', send: 'command'}, '*')

Example Usage:

Executes whoami

window.postMessage({type: "terminal", send: "whoami\n"})

Opens vim, writes hello world to the file hello and closes vim

window.postMessage({type: "terminal", send: "vim hello\nihello world\x1b:x\n"})

Enables iframe communication with terminal via postMessage:
iframe.contentWindow.postMessage({type: 'terminal', send: 'command'}, '*')
@tsl0922 tsl0922 force-pushed the main branch 4 times, most recently from ee05f21 to a9b2d19 Compare March 20, 2026 05:39
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.

Add postMessage to Programming Interface

1 participant