Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:11:12+00:00 2026-06-14T22:11:12+00:00

I’m using the Firefox Add-On SDK to port a Chrome extension to Firefox. In

  • 0

I’m using the Firefox Add-On SDK to port a Chrome extension to Firefox. In Chrome, it’s trivial to load third-party libraries like Underscore or Backbone. In my particular case, I’m using jQuery, Underscore and Backbone to define models that communicate with cross-domain REST APIs.

It’s unclear to me how you might do something similar in Firefox. From what I can see main.js corresponds directly to Chrome’s background pages, but it doesn’t appear there’s a way to load js files.

Am I missing something?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:11:14+00:00Added an answer on June 14, 2026 at 10:11 pm

    Add-on SDK supports CommonJS modules sysem, same modules that are also used by nodejs
    https://github.com/mozilla/addon-sdk/tree/master/app-extension

    Underscore has a support for commonjs module format & there for can be loaded easily
    https://github.com/documentcloud/underscore/blob/master/underscore.js#L54-L65

    All you need is drop underscore in next to main.js and loaded it as follows:

    var _ = require("./underscore")
    

    I do believe backbone can also be loaded in a similar way as people have being using it
    on nodejs.

    It’s won’t work for the jQuery though, that’s because context where add-on SDK modules
    run is different from typical web page context with DOM, which is what jQuery is designed
    to work with.

    Now if you want to do cross domain requests there SDK comes with a module to do that:
    https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/request.html
    There is also another low level XHR module, that you could use instead:
    https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/api-utils/xhr.html

    So if you just want to write models and talk to REST API it should be pretty trivial, I’m
    not sure what’s the role of jQuery in your use case. It implies DOM and UI you want to
    display. If so there is several modules in SDK that would let you add custom UI for the
    firefox and you can probably find useful tutorial on that subject:
    https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/index.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I've got a string that has curly quotes in it. I'd like to replace
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.