I've been playing around with the Gecko ActiveX
control
. Check out this screenshot I made of Gecko
being embedded into Internet Explorer showing a remote
XUL user-interface (the XUL Channels RSS Reader).
Things work well, and it is fast. Not sure of the
memory usage; I see something named 'svchost' in my
Windows Task Manager, which I imagine is the Gecko
ActiveX control running out-of-process at about 15
megabytes. Thats a wild guess though. The speed is
great, popup windows don't work.

Most people don't know that this control is now bundled with Mozilla and FireBird; all you need to do is to register the control. Drop down to a shell, change to your Mozilla bin directory, and type the following:

regsvr32 mozctlx.dll

Make sure you typed mozctlx.dll and not mozctl.dll, since both of those files exist. Now open Internet Explorer; you'll need to configure Internet Explorer so that it will run unsigned ActiveX controls (The Gecko ActiveX control is unsigned; we should start signing this with a key). After doing so, go to this page to have the Gecko control be embedded into IE. You can then navigate over to a XUL app, which is what I did. You could also simply create your own HTML that uses the object tag to refer to the Gecko control:


<object
classid="clsid:1339B54C-3453-11D2-93B9-000000000000"
id="Browser1"
data="DATA:application/x-oleobject;BASE64,TLU5E1M00hGTuQAAAAAAAAADAADhOQAA3xoAAA=="
width="560" height="260">
</object>


Now you can simply script this control using Internet Explorer JavaScript within your HTML page:

Browser1.Navigate(url);
Browser1.GoBack();
Browser1.GoForward();


To have it run your XUL application, make sure the width and height attributes are correct. Then, after the document has loaded (set a onload event handler), call Browser1.Navigate(url_to_your_XUL_app).

Comments

Popular Posts