XUL extension call page javascript

Hi all,
I am trying to get my XUL Extension (Firefox 45.5) to call javascript on my local page. I tried to follow the instructions on : https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Tabs/executeScript

It always causes my extension to stop working. I really want to call a jquery $(‘form’).submit(), but I can set up a regular javascript function if I need to.

Can someone please help me with what I am doing wrong? Thanks.

When I try to run an example like the one in that url, I get “browser is not defined”

The documentation is not for XUL extensions, or in other words, you’d have to write an actual WebExtension to use that API.

Thanks. If that is the case, how can I call a javascript on my page using XUL extension?

Or if that is not possible, can I cause the form to submit?

Anyone? I really need to solve this problem.