Plugin for printing your
static-console messages using
$ npm install --save static-console-plugin-alert-output
const c = require('static-console'); const AlertOutput = require('static-console-plugin-alert-output'); c.outputs.myLog = new AlertOutput(); c.routers.std.tasks.set(c.outputs.myLog, c.models.raw);// We add task for StdRouter bundled with StaticConsole to convert messages with RawModel c.logt('info', `Starting log`); c.log(`Another message`);
Test in any browser environment bundled with Node.js.
c.outputs.myLog is now invoking alert modal with each new message.
AlertOutput may be used as alternative to standard output in case when it is not available.
alert has blocking implementation, used in syncronised code. If you want non-blocking API, try other plugin for
model is the object that should have descriptive properties:
data- string with message. It could be converted with RawModel.
Defines window in which
alert will be called. Default: