Skip to content

Conversation

@itadventurer
Copy link

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'}, '*')
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