Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    console-widgetpublic

    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

    install

    npm i console-widget

    Downloadsweekly downloads

    18

    version

    1.0.1

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar