Slashdot Mirror


A Good Resource for Learning XUL & Javascript?

RJabelman asks: "I'm trying to write a Mozilla extension, but I can't find a decent resource to learn from. Tutorials abound for packaging up an extension, and the web's littered with Javascript snippets to pretty up a web page, but there seems to be very little authoritative information for doing serious work with Javascript, XUL and Mozilla (and more specifically, manipulating XML). I can find my one true resource for every other language or API I've learned: but not this. Can anyone point me to theirs?"

4 of 82 comments (clear)

  1. Dynamic menus by Earlybird · · Score: 4, Interesting
    The XUL/Mozilla/Firefox documentation is scattered all over the place. You survive on bits and pieces, little tutorials someone cooked up on their own time, the Mozilla reference, existing extensions, etc. Documentation is often written for the old Mozilla suite, and thus out of date with respect to, say, Firefox' new extension-loading conventions.

    What I want to know, which nobody seems to document, is how to create menus dynamically in Firefox. Instead of specifying the menus statically in XML, I want to create them at runtime -- specifically, I want to create a top-level menu item and populate its submenu at runtime based on HTTP queries or something similar. I know it's possible, but I have not figured out how.

  2. Javascript is nice, but by Dracos · · Score: 2, Interesting

    When will we be able to write XUL apps in PHP, like can be done with Perl, Python, and Ruby?

    1. Re:Javascript is nice, but by rycamor · · Score: 2, Interesting

      Don't underestimate Javascript. In some ways, Javascript is actually a more elegant and well-thought-out language than PHP. See Crockford's rant.

      Many *implementations* of Javascript are lacking, but Mozilla applications turn Javascript into a full-featured scripting language, including the ability to use sockets, read/write files, run other executables, and in general do just about everything you would need to do for a XUL "front end" application. For more serious back-end integration, just use sockets to talk to other processes, which can be written in PHP, C, Python, whatever.

  3. Go for... by sabit666 · · Score: 2, Interesting

    Laszlo
    http://www.openlaszlo.org/