Javascript and XUL

I've been poking around inside the Firefox browser and I must say I'm incredibly impressed with the architecture of XUL. Actually, I'm floored. They've done an super slick job separating out structure, style and behavior into distinct layers. Basically, when running Firefox, everything you see is defined in a XML file, the look of it is comes from cascading style sheets, and every action you take has Javascript involved in some way behind the scenes. That means almost everything is customizable.

At it's core, XUL is general purpose development platform, and I must say if you need to build something GUI heavy that also needs to be cross platform, you should seriously consider this. If someone hooked up a replicatable object database underneath it, you'd have a pretty damn good head start on building a Notes replacement. Hmmmm.

I found this comment in a file named web-panels.xul:

<!--XXXBlake XUL sucks! We need autocheck for menuitems. -->

I disagree, XUL most certainly does not suck.

The other thing I discovered in an XUL file, if you middle click on the Back or Forward button it opens the previous or next page in a new tab. If you have a mouse wheel button, that should work. Very useful.

Anyway, I've created an extension that does the right double click back thing, and I've modified it to also close the window if there is no previous document. I'm going to live with it for a little while and see how I like it. Feel free to try it yourself:

Download rightdoubleclickback.xpi

Posted May 18, 2005 11:03 PM

Comments

You can use XUL with Domino 6 quite nicely. Just make sure you set the mimetype application/vnd.mozilla.xul+xml on pages or forms. For views, you can embed them in a page and set the mimtetype like above. Another option I used and which seems quite fast, is to use HTTPXMLRequest to get the XML of a view via ?ReadViewEntries, transform it with the built-in xslt processor into xul and add it to the DOM-Tree of the current XUL Document. Domino Web Mail could be so cool with XUL.

Peter Leugner, May 19, 2005 4:10 AM

Hi Damien,

I was wondering if your extension could work with Thunderbird ?

Thanks,
Gaston

Gaston, May 19, 2005 6:29 AM

Would be nice if double-right clicking the last window didn't close the whole browser...

Mike Schirpke, May 19, 2005 10:17 PM

Post a comment




Remember Me?

(you may use HTML tags for style)