xpcom

How to preprocess HTML before it's loaded and parsed by Mozilla?

I need a way to process HTML before it's actually loaded and parsed by Mozilla. Is there any content listener that I can use in my Firefox extension? ...

getting firefox chrome-window from XPCOM component

I am writing an XPCOM object that will like to access the main firefox window, and the open tabBrowsers. What is the interface that I should use ? ...

Handling crash dumps from Firefox and Google Chrome

Hey all, I'm developing a cross-platform NPAPI+XPCOM extension for Firefox and Google Chrome (Windows, Linux and Mac). I was wondering if anyone could enlighten me on the best practices of handling component crashes. As I understand it, currently Mozilla's Crash Reporter submits mini-dumps and crash reports created to Mozilla Dev. I ex...

How to work with files in XPCOM

Hi all, I'm writing a Mozilla component to get all the links from a page an write them into a file using XPCOM and C++. I get all the links into an array like this: //doc is a pointer to nsIDOMDocument doc->GetElementsByTagName(NS_LITERAL_STRING("A"), getter_AddRefs(nodeList)); nodeList->GetLength(&nodeNumb); href = new nsEmbedString[...

C# interop to XPCOM

Before asking my question, I should admit that my knowledge of .NET interop is sparse, so I realize that I might be making a newbie error. I am using the GeckoFx library to create a C# application that contains an embedded Gecko (Firefox) browser instance. The app works well using GeckoFx in its original form, but I need to extend it to...

Calling a dll function from JS XPCOM

Hi every one. I wanted to know if the XPCOM JS can call an external dll function ? I have a dll that exposes certain functions. I want my XPCOM JS function to be able to call the dll function. Is it possible ? ...

What is XPCOM? XPCOM vs COM?

Hi all, I have trouble understanding XPCOM. How is it different from COM? What makes it cross platform? Is it a framework with a set of libraries that you can use to do some jobs? Also, does Component Object Model means every functionality is implemented in component so we can use it without knowing the detail implementation? Can y...

Firefox extensions: custom autocomplete

I've found code sample for google autocomplete and created other components for Bing and other search providers, but I can't switch autocompletion. I use following code to change autocompletesearch, but it doesn't work. Component works only if I define autocompletesearch property in XUL. textbox.setAttribute("autocompletesearch", engine...

Firefox extension development firefox4

So I've been working on updating old extensions for use with FF4 and Gecko 2 but I am having some issues where I am getting an error that says, classID missing or incorrect for component.... Has anyone else had a similar issue or know of how to get around this? function jsshellClient() { this.classDescription = "sdConnector JavaScrip...

Error 0xc1f30001 when calling asyncListen method of nsIServerSocket interface in Firefox while there is no internet connection

CAN'T REPRODUCE ANYMORE The code below works fine when there is internet connection. var socket = Cc["@mozilla.org/network/server-socket;1"] .createInstance(Ci.nsIServerSocket); socket.init(-1, true, -1); socket.asyncListen(nsIServerSocketBug); However once the computer is disconnected from the internet, I get ...

Gecko NSModule: ContractIDEntry "nsID const *"?

I created a FireFox addon a while a go, and noticed it stopped working on FireFox 3.6 Apparently, NSGetModule is being replaced with an NSModule structure, so I have to adapt. I'm coding my product with Delphi, so I have to port the new code to Object Pascal. If I look over this code: http://mxr.mozilla.org/mozilla-central/source/xpcom/...