console-widget

1.0.1 • Public • Published

console-widget

An interactive console control widget for your webpage

screenshot

Interactive demo at http://deathcap.github.io/console-widget (or run npm start)

Usage

var consoleWidget = require('console-widget')();

consoleWidget.open();

You can write text to the console output using:

consoleWidget.log('hello');
// or add arbitrary DOM nodes using logNode() instead

and handle user input by listening to the 'input' event:

consoleWidget.on('input', function(text) {
    consoleWidget.log('You wrote: ' + text);
});

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i console-widget

Weekly Downloads

5

Version

1.0.1

License

MIT

Last publish

Collaborators

  • deathcap