MozillaZine

Compile a simple loadFrameScript frome browser.xul

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

Post Posted August 30th, 2015, 3:07 pm

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.

LIMPET235
Moderator

User avatar
 
Posts: 37723
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted August 30th, 2015, 3:15 pm

Moving to 3rd Party Builds...
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-56.0.1-57.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
RadioYachting.
(Always choose the "Custom" Install.)

nvoid
 
Posts: 4
Joined: August 19th, 2015, 8:48 am

Post Posted September 29th, 2015, 1:59 pm


Return to Third Party/Unofficial Builds


Who is online

Users browsing this forum: No registered users and 2 guests