Console.log doesn't work in safe browser

Hello. I’ve compiled a mock routing SafeBrowser and I have problem with executing JavaScript from a file accessed by localhost:// protocol.

Contents of file:

<!DOCTYPE html>
		<meta charset="utf-8" />
		<script type="text/javascript">

and screenshot:

Does anybody have an idea what’s wrong? Or how can I debug this situation? Code executes in Firefox.

Try moving your script into the HEAD section - I don’t think it is allowed inside BODY.

Script is allowed in body. But nevertheless, results are the same. Thanks for giving a try :slight_smile: Anyway, code executes as expected in Firefox.

Maybe there is a debugging process I can use to provide more info on the problem? What more information could be useful to help fix the problem?

Try alert('Hello World') instead of console.log()


Goog idea. It worked! Back to the old JS days haha :slight_smile:

1 Like

Make sure you click inspect element on the website you load not on the default page from the safe browser. The developer tools window should have the url you are using at the top of the window, not beaker:shell-window.


This changes everything. Thanks! It seems I’m too used to Firefox way of working - SafeBrowser is different in many ways (no F5, no F6, no Ctrl-PgUp/Ctrl-PgDn,…)


This topic was automatically closed after 60 days. New replies are no longer allowed.