Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add postMessage to Programming Interface #1091

Open
zzjin opened this issue Apr 12, 2023 · 1 comment
Open

Add postMessage to Programming Interface #1091

zzjin opened this issue Apr 12, 2023 · 1 comment

Comments

@zzjin
Copy link

zzjin commented Apr 12, 2023

When we want to use programming interface to auto run some command for user, we encountered issues when main site and ttyd site are host under subdomains.

for example:
we run a web site that helps show some useful debug commands, under a.com, with one ttyd iframe using sub domain: ttyd.a.com.
when one clicks debug command at a.com's page, we want to auto pate and run inside ttyd.a.com's iframe, but there shown errors:

Blocked a frame with origin "https://a.com" from accessing a cross-origin frame.
    at <anonymous>:1:68
(anonymous) @ VM202:1

So wish there have some postmessage programming interface to communicate to ttyd pages to just run some limit commands like paste&run command.

@tsl0922
Copy link
Owner

tsl0922 commented Apr 28, 2023

I'm OK to merge a PR for this feature, If you know how to implement it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants