Closed rjcorwin closed 9 years ago
Thanks R.J.
It would be nice if you update the readme file and explain the new feature.
Thanks again.
Hi Boyan. Thank you for accepting the pull request. It could definitely use some documentation, some linting (do you have one you prefer?), and there is a potential performance implication. I think the event listener here needs to be cleaned up on exit. I'll get you a second pull request sometime this week.
On Tuesday, April 14, 2015, Boyan Rabchev notifications@github.com wrote:
It would be nice if you update the readme file and explain the new feature.
Thanks again.
— Reply to this email directly or view it on GitHub https://github.com/rabchev/web-terminal/pull/17#issuecomment-92871995.
rj@rjsteinert.com http://rjsteinert.com http://twitter.com/rjsteinert http://github.com/rjsteinert
To make this cross-domain compatible, this could be refactored to use the postMessage
API. https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
AKA Expose an
exec
function so other web apps can use web-terminal to run commandsHi there - I'm building an Web App that exposes a form based GUI that runs commands via web-terminal. Much like
exec
in other languages, here's a client side implementation ofexec
that utilizesweb-terminal
.Example:
To allow isolating of the web-terminal program and a web app (web app might not want jquery mobile library), I also added the ability to run this
exec
function from the a parent to aweb-terminal
iframe. There are some restrictions to this such as needing to be on the same domain, but you can be at different ports which works for my purposes where there is an app running at domainlocalhost
on port 80 whileweb-terminal
is running onlocalhost:8080
.I also added an example. It could be cleaned up if there is a desire to accept this pull request.