mirror of
https://github.com/mathew-kurian/Scribe.js
synced 2025-04-24 14:25:00 +00:00
Add events example
This commit is contained in:
parent
2c49b68c77
commit
870495143e
1 changed files with 20 additions and 0 deletions
20
examples/events.js
Normal file
20
examples/events.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*jshint -W079, -W117 */
|
||||
(function () {
|
||||
|
||||
require('./scribe')();
|
||||
|
||||
var console = process.console;
|
||||
|
||||
console.addLogger('fire');
|
||||
|
||||
console.on('fire', function (log) {
|
||||
//call 911
|
||||
phone.call911(log.argsString);
|
||||
});
|
||||
|
||||
/* .... */
|
||||
|
||||
//Somewhere in your code
|
||||
console.tag("Argggg").fire("Need help !");
|
||||
|
||||
}());
|
Loading…
Add table
Reference in a new issue