Wednesday 15 July 2015

How to initialize terminal manually? -



How to initialize terminal manually? -

how may log stuff terminal before user focuses terminal , presses come in key?

i cannot find way access echo method of terminal outside phone call function scope.

the "greetings" alternative not help, trying utilize terminal show logs of background application running.

thank you.

found it, setting "terminal" method variable returns created terminal (as constructor).

took me while find out, maybe because don't have much experience jscript , has different concepts variable access, inheritance, etc.. other languages.

now can store created terminal , utilize right after creation:

$(function () { var terminal; terminal = $('#consolediv').terminal(function(command, term) { if (command !== '') { interp.eval(command); } else { term.echo(''); } }, { greetings: false }); terminal.echo("logging , using terminal right after creation"); });

jquery-terminal

No comments:

Post a Comment