Created
December 30, 2013 02:43
-
-
Save shallaa/8177205 to your computer and use it in GitHub Desktop.
trace log in browser console.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
import flash.external.ExternalInterface; | |
public class DebugConsole extends Sprite | |
{ | |
public function DebugConsole() | |
{ | |
ExternalInterface.call( "eval", "var console = window.console || {log:function(){}};" ); | |
traceLog( "test" ); | |
} | |
private function traceLog(log:Object):void | |
{ | |
ExternalInterface.call("console.log", log ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment