Compile a simple loadFrameScript frome browser.xul

Discussion of third-party/unofficial Firefox/Thunderbird/SeaMonkey builds.
Post Reply
nvoid
Posts: 4
Joined: August 19th, 2015, 8:48 am

Compile a simple loadFrameScript frome browser.xul

Post by nvoid »

As I'm compiling Firefox from mozilla-central repo, and attempting to load a content script into every page using loadFrameScript, but I'm running into a brick wall, not sure what I'm doing wrong.

//top of browser.xul:
//working and i see foo output to the browser console
let globalMM = window.messageManager;
globalMM.loadFrameScript('data:,console.log("foo\n");', true, false);

//not working - no output
let globalMM = window.messageManager;
globalMM.loadFrameScript('chrome://browser/content/my_scripts/test.js', true);

//browser/content/my_scripts/test.js
dump("foo\n");

dump and console.log are the only functions i have access to using the browser console i can verify they are working, i read I'm suppose to have access to content dom? but variations of content.SOMETHING aren't working, and i get an error message saying: TypeError: content.document.dump is not a function.
User avatar
LIMPET235
Moderator
Posts: 39920
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Compile a simple loadFrameScript frome browser.xul

Post by LIMPET235 »

Moving to 3rd Party Builds...
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Post Reply