Support for functional Log
This commit is contained in:
parent
88f8bf9fac
commit
bee10b992f
@ -92,8 +92,13 @@ Dragonfly.prototype.Log = function( mesg, sphere, visibility )
|
||||
write = ( this.currentSphere % 10 < sphere % 10 );
|
||||
}
|
||||
|
||||
// Writeline if yes
|
||||
write && this.writeLine( mesg );
|
||||
if( write )
|
||||
{
|
||||
typeof( mesg ) == "function"
|
||||
? mesg( this.writeLine )
|
||||
: this.writeLine( mesg )
|
||||
;
|
||||
}
|
||||
};
|
||||
|
||||
Dragonfly.prototype.writeLine = function ()
|
||||
|
Loading…
Reference in New Issue
Block a user