Skip to content
Sign upLog in
← Back to Community

Can you display the JavaScript console on an html page?

Profile icon
Michael8910

So I want to have it where you can access the javascript console on the HTML page without opening the inspector and all of that. I tried looking this up but can't seem to find anything of what I am asking. So is it even possible to do this(without having to write 1000 lines of code and rewrite the entirety of the javascript programming language)?

Voters
Profile icon
EpicCoderGuy1
Profile icon
Michael8910
Comments
hotnewtop
Profile icon
Coder100

I mean the only thing you need to reverse engineer is basically console.log.

Here's a small thing I made:

https://replit.com/@Coder100/HummingSmartBlock-nionkomokmiomiomionion#script.js
Ideally you dont want to hack the lang, and instead be specific about the terminal.

Profile icon
codingjlu

Check out this downvote post: https://stackoverflow.com/questions/19846078/how-to-read-from-chromes-console-in-javascript/19846113

P.S. from now on I'll refer to SO as downvote xD because everybody downvotes too much (maybe that includes me lol)

Profile icon
RayhanADev

Well, I made something a long time ago that did kinda what you want:
https://replit.com/talk/share/Presenting-CLIio/60899

Profile icon
Michael8910

@RayhanADev
yea that is sorta what I want but then is there a way to also display output like console.log

Profile icon
RayhanADev

@MikeJMS8910
umm I'm pretty sure I just hijacked console.log and such and then used that as output. Check into the code and let me know.