admin管理员组文章数量:1308419
I wonder if there is a 'local runtime environment' for hosting Javascript code, that's not browser based, for running small local apps? Something like WSH (Windows Scripting Host) for JavaScript (not MS-JScript).
I would like to run some javascript scripts locally, like I might for VBScript (VBS), with the possibility of some of the following:
- Access to local files (perhaps via an FSO object)
- Simple console read/write
- Recent version of Javascript
- Some form of simple debug
Alternatively, how might one consider running a browser in 'local' mode only? ie: launch, run-code, exit, perhaps with mand-line switches/options, without too much overhead? If so, which browser? FireFox? Might it be possible to somehow 'extract' the JS runtime engine/DLL and call that?
So, in brief, something like WSH just for javascript?
Thanks.
I wonder if there is a 'local runtime environment' for hosting Javascript code, that's not browser based, for running small local apps? Something like WSH (Windows Scripting Host) for JavaScript (not MS-JScript).
I would like to run some javascript scripts locally, like I might for VBScript (VBS), with the possibility of some of the following:
- Access to local files (perhaps via an FSO object)
- Simple console read/write
- Recent version of Javascript
- Some form of simple debug
Alternatively, how might one consider running a browser in 'local' mode only? ie: launch, run-code, exit, perhaps with mand-line switches/options, without too much overhead? If so, which browser? FireFox? Might it be possible to somehow 'extract' the JS runtime engine/DLL and call that?
So, in brief, something like WSH just for javascript?
Thanks.
Share Improve this question asked Nov 22, 2011 at 11:46 andoraandora 1,3661 gold badge13 silver badges24 bronze badges 1- 1 What differences between JScript and JavaScript 1.5 are giving you problems? – Quentin Commented Nov 22, 2011 at 12:05
4 Answers
Reset to default 6http://nodejs/ gives you javascript running on V8.
It runs on Mac, Linux and Windows and gives you access to a huge number of libraries in very rapid development using the Node Package Manager(NPM).
If you want to do serverside/local javascript, this is what you should use and not some proprietary windows environment.
What you are looking for is called HTA. (Documentation)
In HTA you can use jQuery, javascript, HTML, FSO, EXCEL, Command Line it works great.
The down side. It works only on Windows and with the IE rendering engine.
WSH can run Chakra, which is EcmaScript 5.
node.js is largely used for server apps, but it's quite usable for mand line tools as well.
本文标签:
版权声明:本文标题:vbscript - Is there a local runtime environment for running Javascript? (like Windows Scripting Host for JScript) - Stack Overfl 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741852175a2401135.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论