Yes, there are command-line browsers that support JavaScript, although they might not be as straightforward as traditional graphical browsers. Here are some options:
1.
-
: Browsh is a modern text-based browser that runs in the terminal. It uses a headless Firefox instance under the hood, which allows it to render anything a modern browser can, including HTML5, CSS3, JavaScript, video, and even WebGL.
-
: Browsh supports JavaScript execution and can display web pages with dynamic content. It also supports extensions like Adblock.
-
: Browsh is available for Linux, Mac, and Windows. It can be installed via Docker or run directly from the terminal.
2.
-
: Elinks is an older text-based browser that can be compiled with JavaScript support using the SpiderMonkey engine. However, its JavaScript support is limited and not enabled by default due to compatibility issues.
-
: Elinks can execute JavaScript if configured correctly, but it may not work well with many modern web pages.
-
: Requires manual compilation with JavaScript support, which can be challenging.
3.
-
: EdBrowse is an ed-style editor/browser that claims to support JavaScript based on Mozilla's engine. It is optimized for blind users and sysadmins.
-
: EdBrowse offers scriptability and JavaScript support, though it might not be as polished as Browsh.
-
: It is less commonly used compared to Browsh but can be an alternative for specific needs.
4.
-
: Tools like PhantomJS, Selenium, Puppeteer, and Playwright are not traditional browsers but can be used from the command line to execute JavaScript and render web pages. They are often used for web scraping and automation.
-
: These tools provide full JavaScript support and can interact with web pages dynamically.
-
: Typically used in scripts for automation rather than interactive browsing.
Conclusion
For users looking for a command-line browser with JavaScript support, Browsh is currently the most viable option. It offers a modern take on text-based browsing with full JavaScript support, making it suitable for navigating dynamic web pages. Other options like Elinks and EdBrowse may require more setup or have limitations in their JavaScript capabilities.
Citations:
- https://superuser.com/questions/448514/command-line-browser-with-js-support
- https://www.reddit.com/r/commandline/comments/rhquu6/command_line_web_browser_that_can_load_javascript/
- https://stackoverflow.com/questions/51125774/are-there-any-command-line-browsers-which-can-execute-javascript-on-the-dom-and
- https://softwarerecs.stackexchange.com/questions/11678/text-based-browser-that-runs-javascript
- https://askubuntu.com/questions/34687/is-there-a-text-mode-browser-which-supports-javascript
- https://forums.freebsd.org/threads/recommended-text-based-browser-pkg-with-javascript.87186/
- https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Browser_support_for_JavaScript_APIs
- https://www.linuxquestions.org/questions/linux-newbie-8/terminal-browser-with-js-anything-newer-than-elinks-4175734833/
0 Comments