Now it’s time to look at the WebLock component as another example of XPCOM components (since you’ll be creating it shortly). This is a book about Gecko, and about creating XPCOM components for Gecko- based applications. Though the emphasis is on the practical steps you take to. About. This is a step-by-step tutorial on creating, building and registering an XPCOM component on Linux and MS Windows.

Author: Akilrajas Arabei
Country: Malta
Language: English (Spanish)
Genre: Politics
Published (Last): 22 August 2017
Pages: 377
PDF File Size: 3.45 Mb
ePub File Size: 17.97 Mb
ISBN: 524-7-15070-698-3
Downloads: 51951
Price: Free* [*Free Regsitration Required]
Uploader: Vozahn

It seems, that Alex Sirota is too busy with his job as that he could correct the example to a working version.

I tested alex’s complete code example. You agree to receive updates, alerts and promotions from CBS and that CBS may share information about you with our marketing partners so that they may contact you by email or otherwise about their products or services. Explore the capabilities of Mozilla’s XML proxy class. I used the same latest gecko 1.

Creating XPCOM components with JavaScript

I try over Firefox 1. If you use firefox 1. When I start Thunderbird my xpt file gets registered in xpti. But i don’t know where to get started about that. Mozilla browsers also introduced XPConnect technology, which allows components to be scripted in and developed with JavaScript. The component registrar uses the information in an XPT file to register the component with Mozilla. You don’t need to modify these three files unless there’s a need to modify the interfaces of your component.


I agree with the first comment, that the world needs such a compact tutorial on XPCOM components, but it needs a working one! If anyone is having problems, eg getting unresolved references than check this webpage http: Look up dependent glue in the table and use the settings there.

These three layers are required, and each layer requires certain methods as you can see in Listing A. In this article, you learned how to create, develop, and test an XPCOM component that can be used by Firefox as an extension of an application.

The example works for me under XP, ff 1. Please review our terms of service to complete your newsletter subscription.

I have compiled Successfully.

Creating XPCOM Components

In most cases, JavaScript functions are included as a library and are keep in an individual. I tried crrating build the component as per the steps given for linux. When it is going to work, it will definately be a greet help for many programmers!

I encountered an error while compiling compondnts the project: Typically, you wouldn’t modify anything in this header file. Does anyone have an idea what library could provide this function? In this article, all the instructions, environment variables, and command line will be in a Linux operating system.


Create and implement an XPCOM component for the Firefox browser

On the other hand the final nightly http: It provides a function to request the interfaces on a class. Thanks to Nigel McFarlane for this from hack 82 in O’reilly: Compknents you unpack this into a separate directory, you can use the -h on xpidl.

If you try HTML, you can make various improvements. I use Firefox 1.

The directory structure should look very similar to Listing 2. You can install gecko-sdk with the default option. Also me suggest the best version of Gecko-sdk with all the libs,idl and header files that suits my requirement and also where from where I can download since many versions are available. I haven’t tried it on linux. Download the Gecko SDK for your platform. The link to part 5 of the IBM dw article is broken, the correct link is: For the browser to benefit from the functions provide by an XPCOM component, the component must first be registered to the browser.

Using Mozilla Firefox 1. For Registering the component with Firefox 1. Mozilla also provides a component construction process to easy creation with JavaScript.