About
Embedding Guide
API Reference
Source Code

Chrome Console

An embeddable console for any language.

Console.js is an open-source embeddable console, written in JavaScript. It attempts to match most of the features provided by Chrome's JavaScript console. The end goal is to make it compatible with all major browsers. It can be easily embedded in any web page or browser application like NW.js and electron.


Console.js doesn't contain any code which handles the user input. The user input is sent to your application after it is entered into the console. You process the users inputs and return what the output is. The Console API will handle how the outputs you provide are displayed. For instance, objects will be collapsable and error/warning/info messages will be formatted with red/yellow/blue backgrounds.


If you want to embed a fully working JavaScript console into your website/application you can load the jsConsole.js script. The inputted code will run in a worker, protecting the DOM from being changed by users and preventing the page from freezing due to infinite loops. You can also break out of infinite loops with Ctrl+C on Windows and Linux, and Cmd+C on Mac.

The console uses AJAX's Ace Editor to provide custom syntax highlighting, custom themes and a powerful API to assist web/application development.
Page has been last updated on: 20 Jan 2018
Contents
Chrome Console
An embeddable console for any language.