D
D
Dima2017-03-03 10:51:49
JavaScript
Dima, 2017-03-03 10:51:49

Can any browser be used as a JavaScript command line interpreter?

Actually a subject. I thought, is it possible to launch a browser from the command line to process js without opening a window?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dima, 2017-03-07
@v_m_smith

Chrome Headless - full CLI Chrome
https://habrahabr.ru/post/328800/

N
netW0rm, 2017-03-03
@netW0rm

Nodejs REPL

R
Rou1997, 2017-03-03
@Rou1997

As far as I know, Chrome and Firefox - no, it’s impossible, they generally aim to be an “OS within an OS”, so there is almost no external API, but there are opportunities to create extensions and plugins that can be activated one way or another from the browser itself, and if from outside, then you already need to write an application for the "main" OS, and somehow build a "bridge".
If you look at Node.js, then it’s better not to use it, but “clean” V8, I looked at it, it has CLI, like Python, etc., it doesn’t need to require administrator rights.
There is also a JScript interpreter built into Windows, but if JScript is JS, then IE is a browser. :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question