Skip to content

Commit

Permalink
Provide print() statement for the try page
Browse files Browse the repository at this point in the history
  • Loading branch information
techtonik committed Feb 8, 2016
1 parent 981a9e3 commit 54fc181
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/js/try.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ if(typeof console === 'undefined'){
console = {};
console.log = function (str) {$("#out").text(uneval(str))};
}
// noop
print = function (){}

// Can't just do 'print = console.log' because of chromium bug #179628
print = console.log.bind(console);

var printOut = function (str) { $("#out").text(str); };

Expand Down

0 comments on commit 54fc181

Please sign in to comment.