is it possible to get the values from browser console and display the result in browser UI?
Let say i created a 3 different function , when user enters in browser console, the output of it should be displayed in the UI. Is it possible?
4 Replies
I doubt it, there's probably some security implications there. It's also bad practice to tell people to use the browser console, it's very easy to get your accounts stolen if you follow random people's instructions to open the console and type stuff there, so it's best to treat it like it doesn't exist and not get users used to using it
i wanted to know if that could be acheived cause we use window.addEventlistner , so i though browser console would be the same as input textbox
it's not
you can run code a user enters into a text box with
eval
and get the result of that code being run, but that's also got security implications you should read up aboutuse the prompt() function or input type text