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
2
votes
1 answer

Get selected message data in Thunderbird extension

I need to get some e-mail message data in my Thunderbird extension. I found this example on MDN (https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIMsgMessageService): var content = ""; var MessageURI =…
noname
  • 551
  • 9
  • 29
2
votes
0 answers

Xpcom component makes firefox crash

I am buiding a simple XPCOM component. but firefox crashes everytime when I am trying to call a method of this xpcom component. the file hierarchy is…
Quark
  • 55
  • 1
  • 7
2
votes
3 answers

How to convert char* to PRUnichar *

I need to pass char* to XPCOM function but that function accepts PRUnichar *. How to convert from char* to PRUnichar * ?
Xinus
  • 29,617
  • 32
  • 119
  • 165
2
votes
1 answer

XPCOM stub files

1- Is there any XPCOM stub files (javascript) that can be used by PHPStorm for code completion? 2- Is there any way to facilitate FireFox plugin development in PHPStorm? 3- How can I set FireFox as the only browser target for syntax checking?…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
2
votes
2 answers

Firefox XPCOM component - Permission denied to call method UnnamedClass

Can a firefox XPCOM component read and write page content across multiple pages? Scenario: A bunch of local HTML and javascript files. A "Main.html" file opens a window "pluginWindow", and creates a plugin…
Curious Developer
2
votes
1 answer

Content-Policy xpcom component for standalone XULRunner SDK app in Javascript

I've created a small browser with XULRunner SDK 15 and all basic functions work now (back, forward, refresh etc.). I would like to add image blocking capabilities using the nsIContentPolicy interface and shouldLoad function in Javascript. I've read…
SkynetTX
  • 21
  • 1
2
votes
3 answers

How can I change label of OK/Cancel buttons of a dialog window?

How can I change/tranlate label of OK/Cancel buttons of a dialog window of XPCOM? You can see a list of such buttons here. Indeed I want localize Zotero Firefox add-on. A portion of code that display such dialog is here: var regenerate =…
Handsome Nerd
  • 17,114
  • 22
  • 95
  • 173
2
votes
1 answer

Getting mime types array in Firefox Add-on script

I'm trying to get MIME types list on a firefox extension side. There is navigator object in browser JavaScript context. It has mimeTypes property - list of MIME types recognized by the browser. I need to get that list in add-on script using Add-On…
Dmitry
  • 35
  • 5
2
votes
0 answers

Writing a Firefox Extension that uses XPCOM components?

I'm trying to write a Firefox extension that writes Firefox's history into the Windows system history, which ought to be useful for folks at work who use IE and Firefox to get work done. Adding pages to IE history appears simple enough…
sigint
  • 1,842
  • 1
  • 22
  • 27
2
votes
1 answer

nsIFile: How to get Vista AppData/LocalLow folder path?

I am able to get path to User 'AppData/Local' folder as follows, appdatafile = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). …
ManojMarathayil
  • 712
  • 11
  • 28
2
votes
2 answers

How can I monitor a file asynchronously in Firefox?

I want to monitor a plain text file on windows machine for changes to it. Whenever external application updates the file, my add-on is supposed to read it and act accordingly. Going through quite bit of documentation I could not find a direct…
dpb
  • 353
  • 4
  • 15
2
votes
1 answer

How to create hidden iframe/browser from JavaScript XPCOM component?

I need one hidden iframe for all opened Firefox windows. For now I'm creating iframe inside XUL overlay, so it is created for each browser window. I think i should use XPCOM component to have single iframe instance for all browser windows, but i…
KAdot
  • 1,997
  • 13
  • 21
2
votes
1 answer

how to change firefox proxy settings using xpcom

I have a proxy server running on localhost (127.0.0.1) and i have grown tired of having to train users on how to switch proxies in firefox to bypass blocked websites. I decided to write an addon. I wonder how to use xpcom to tell firefox to use a…
Dr Deo
  • 4,650
  • 11
  • 43
  • 73
2
votes
0 answers

XPCOM registration on Firefox with Gecko 12.0

I wrote a binary XPCOM component. It compiled successfully with XULRunner SDK 12.0 (Gecko 12.0) but registering it in Firefox failed! The message is: WARN addons.updates: Update manifest for testxp@meilijie.com did not contain an updates…
flyonok
  • 46
  • 4
1
vote
1 answer

Calling Firefox XPCOM component from Thunderbird extension

I'm doing a Thunderbird extension that will get the stored username/password in Firefox and import those accounts into Thunderbird. This results in the need of nsILoginManager, but I'm not sure how to make it work from a Thunderbird extension. Is it…
wayne
  • 191
  • 1
  • 1
  • 9