10-04-2011
23,310,
4,623
Join Date: Aug 2005
Last Activity: 7 July 2020, 11:47 AM EDT
Location: Saskatchewan
Posts: 23,310
Thanks Given: 1,331
Thanked 4,623 Times in 4,217 Posts
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?