clemos / try-haxe

A small webapp that allows to test Haxe online
https://try.haxe.org
MIT License
126 stars 41 forks source link

let trace being redirected to browser.console #122

Open postite opened 7 years ago

postite commented 7 years ago

in certain case , trace output could be very annoying .

i hacked it like this:

public function moveConsole(){
    var console=body.querySelector("#debug_console");
    console.style.position="relative";
    var consoleWrapper=js.Browser.document.createElement("div");
    consoleWrapper.style.backgroundColor="#00AAFF";
    consoleWrapper.style.width= consoleWrapper.style.height="200px";
    consoleWrapper.style.position="absolute";
    consoleWrapper.style.right="0";
    consoleWrapper.style.overflow="auto";
    body.appendChild(consoleWrapper);

    consoleWrapper.appendChild(console);
}

why not having such an option ? or simply let trace output to the console ?

thx

markknol commented 7 years ago

What do you want to achieve? trace already logs in both browser console and visual console:

image


image

postite commented 7 years ago

mm my bad ! didn't see it :) capture d ecran 2016-11-29 a 12 35 25

ok then ! perhaps just allow a option for disabling the trace output on the visual console .