Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.log command missing #18

Open
marco-faustinelli opened this issue Sep 17, 2015 · 1 comment
Open

console.log command missing #18

marco-faustinelli opened this issue Sep 17, 2015 · 1 comment

Comments

@marco-faustinelli
Copy link

There should be a way to print stuff on the sandbox screen. I understand that console.log belongs to the browser console, but something like sandbox.log should be available.

@DanWilkerson
Copy link

DanWilkerson commented Dec 23, 2016

It's a hack, but if you're using an iframe, you can do this:

  window.sandbox.model.sandbox.console = { 
    log: function(msg) {

      console.log(msg);
      return msg;

    }   
  }; 

[Edit:] The above fails when an async call is involved, unfortunately.. If I come up with a fix, I'll update here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants