Reputation: 1484
I basically want to do what jsbin.com does. Here is their code. That is having a mostly functional console inside my React application. I managed to hijack the console in such a way that i change the return value of each call via this guide. But how could i for example show error messages i get in the console in browser?
Is there a way to intercept console method return values and save them to variables?
I would also love to be able to declare variables via my inbrowser console. What would i have to do to make this possible? Can i send input strings to be evaluated by the console?
Edit:
i found a really great plugin called jq-console which will handle my input and output, BUT how do i handle the input and output? If i for example want to declare a var test = 5;
, how would i do this and then return the corresponding console answer?
Upvotes: 3
Views: 80