I would like to create a "Console" app for JavaScript so that messages are written to the screen.
console.log("Rerouting log messages to the screen");
console.log = function (message) { document.writeln(message); };
console.log("Log messages are now routed to the screen.");
This works, except that each time something is written to the screen, it wipes out any existing content.
Is there a way to do this?