Hello,
Is it possible to run/open a HTML File from bash? I mean that when the HTML File contains an alert JavaScript code that then a message box will be shown?
Thanks!
Hello,
Is it possible to run/open a HTML File from bash? I mean that when the HTML File contains an alert JavaScript code that then a message box will be shown?
Thanks!
You can open an html file using a browser through the shell. Something like this.
firefox "your_html_file"
--ahamed
Thanks. But is it possible to run the HTML file in the background? Or just a JavaScript code?
javascript has no meaning outside of a web browser or scripting engine of some sort. You could hack a raw version of spidermonkey to run raw browserless javascript maybe, but it'd be a ton of work, probably wouldn't understand HTML, and likely wouldn't do what you wanted in the end.
bash is not a webpage and will need to steal an awful lot of things from web browsers to act like a webpage. Why not just do what you want, in bash, in the first place?