Questions tagged [xpcom]

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.

409 questions
3
votes
3 answers

How to obtain firefox user agent string?

I'm building an add-on for FireFox that simulates a website, but running from a local library. (If you want to know more, look here) I'm looking for a way to get a hold of the user-agent string that FireFox would send if it were doing plain http.…
Stijn Sanders
  • 35,982
  • 11
  • 45
  • 67
3
votes
1 answer

Is it possible to create custom XUL elements from XPCOM or NPAPI?

I was wondering if it is possible to create a new XUL component via any available api, such as XPCOM or NPAPI, so we can use it our XUL files. Let's say I wanted to clone the XULs vbox's components code and add a few modifications to it, so we…
santiageitorx
  • 103
  • 1
  • 7
3
votes
2 answers

How does someone use thirdparty libraries to be included in Firefox addons/extensions?

I am currently learning how to create Firefox addons using XPCOM and I want to know how to include thirdparty libraries to develop them. I followed a few tutorials to compile .xpt and .dll from c++ files (noted in:…
user654628
  • 1,429
  • 1
  • 17
  • 37
3
votes
1 answer

Are there JSDoc files for Firefox XPCOM?

While I know much of XPCOM is implemented in C++, it would still be great to have JavaScript stubs with empty functions, constants, and JSDoc. These could be used to support code completion, inspection, quick doc, and other features of IDEs like…
studgeek
  • 14,272
  • 6
  • 84
  • 96
3
votes
2 answers

what's the javascript function scope in firefox components?

I am making a firefox component using javascript. But i am always confused about what is the global scope of the current javascript function, which results in the following questions? I understand some basic concept about global scope of js…
winterTTr
  • 1,739
  • 1
  • 10
  • 30
3
votes
5 answers

Expose an XPCOM component to javascript in a web page

I'd like to write a XPCOM component that gets exposed as a javascript object in a web page. Something like Google Gears is what I'm seeking. That is, after installing the Google Gears Firefox extension, the javascript object 'google.gears' is…
Tom
  • 371
  • 3
  • 8
3
votes
2 answers

Getting access to window object in JSM

I am creating a firefox extension. I want to get a reference to the window object in a JSM file. The file is then imported using Components.utils.import("resource://js/my_module.jsm"); In my_module.jsm there is this line: var jQenv =…
Alexis
  • 23,545
  • 19
  • 104
  • 143
3
votes
2 answers

How to place a Xul window as "Always On Top"?

I found this file at google code with the function: function SetAlwaysOnTop() { var chkTop = document.getElementById("itmAlwaysOnTop"); var xulWin = window.QueryInterface(Ci.nsIInterfaceRequestor) …
The Student
  • 27,520
  • 68
  • 161
  • 264
3
votes
2 answers

How to sign script or webpage requiring UniversalXPConnect privilege

I have a website which uses some functionality implemented in the Firefox extension, which I developed. JavaScript script on one of my webpages requires UniversalXPConnect privilege for communicating with XPCOM component implemented in my Firefox…
user441417
  • 31
  • 1
  • 4
3
votes
2 answers

firefox detect tab id in "sdk/system/events" api

Good day. i have problem with porting chromium extension to firefox. i need to detect all outgoing request and id's of tabs to which it belongs. to detect requests i using system/events api, but i can't find a way how to detect id of tab from…
sss123next
  • 295
  • 1
  • 3
  • 13
3
votes
1 answer

extension components to get visit count in firefox's history and bookmarks?

I'd like to to know which interface can be used to get the visit count of each link in firefox's bookmarks and history for developing an extension I've tried using nav-history-service to get the links for bookmarks and history but can't figure out…
wolfgang
  • 7,281
  • 12
  • 44
  • 72
3
votes
0 answers

XPCOM Shockwave Flash C++

I recently started "playing" with xpcom, and I would like to know if there is a way do interact with a Shockwave flash element. In IE I can use the IShockwaveFlash interface, but for the Firefox I can't find any interface. I tried using the…
João Augusto
  • 2,285
  • 24
  • 28
3
votes
2 answers

Is there an API to disable/enable a Firefox extension?

Is there an API call allowing one to enable/disable a Firefox add-on?
DVK
  • 126,886
  • 32
  • 213
  • 327
3
votes
1 answer

Use Blob on firefox add-on

Been trying to get the following code to work in firefox add-on: var oMyForm = new FormData(); oMyForm.append("username", "Groucho"); oMyForm.append("accountnum", 123456); // number 123456 is immediately converted to string "123456" // HTML file…
s12chung
  • 1,718
  • 1
  • 14
  • 29
3
votes
1 answer

Eclipse plugin for IDL

Is there an Eclipse plugin for syntax coloring (and potentially other features related to) IDL? The specific IDL that I'm working with is Mozilla's XPIDL, so ideally I would like a plugin specifically for that, but if that doesn't exist, a more…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194