Jump to content

Terminal control/Preserve screen: Difference between revisions

Tentative Javascript implementation (assumes browser environment)
(Initial task)
 
(Tentative Javascript implementation (assumes browser environment))
Line 4:
 
[[Terminal Control::task| ]]
 
=={{header|Javascript}}==
 
<lang javascript>(function tcps() {
var orig= document.body.innerHTML
document.body.innerHTML= '';
setTimeout(function() {
document.body.innerHTML= 'something'
setTimeout(function() {
document.body.innerHTML= orig;
}, 1000);
}, 1000);
})();
</lang>
 
This implementation assumes that Javascript is running in the browser.
 
This task does not admit sample output, but you can demonstrate this solution for yourself using the chrome browser: control-shift-J then copy and paste the above into the command line, and hit enter.
6,962

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.