Execute JavaScript in Brave Browser Failed

A simple test javascript:
At https://forum.keyboardmaestro.com/latest, when I execute the following javascript:

var str = document.getElementById('site-logo');
str.outerHTML;

image
On Chrome returns:
image

But on Brave returns nothing.

Does it mean Brave does not support it, or perhaps I messed something up in the settings of Brave Browser?

To quote from:

actions:Execute a JavaScript in Browser [Keyboard Maestro Wiki]

these actions work with Safari or Google Chrome

( most browsers lack an automation scripting API )

1 Like

Hey Martin,

It works for me.

You probably didn't turn ON “Allow JavaScript from Apple Events” in Brave.

-Chris

1 Like

Yes, this will work with Brave Browser, provided that:

  1. BB is the frontmost web browser
  2. You have enabled all of the necessary settings in BB, like:

To be clear, the JavaScript in Browser action works with Safari, Chrome, and all Chrome-based browsers, like Brave Browser.

1 Like

This was indeed the case. :joy::joy:
I did not remember I did that for Safari and Chrome at all!
Thanks a lot!

1 Like