Emulating Window.openDialog with JavaScript arguments in an XPCOM component · 2008-07-02 11:27 by Wladimir Palant
Opening a XUL dialog from JavaScript is usually easy, you use Window.openDialog method that is almost the same as Window.open but also accepts some parameters that the dialog will be able to access via Window.arguments collection. But what if your JavaScript code runs inside an XPCOM component doesn’t have a window? Still not very hard, you use nsIWindowWatcher.openWindow method then. The tricky part here is passing parameters to the dialog however. I had to resort to hacks here in the past, and other people seem to have issues with that as well, so I thought I would share the solution.

Putting an icon inside a menulist · 2006-06-15 16:17 by Wladimir Palant
So I wanted the inline editor for Adblock Plus filters to have an icon that cancels it. Shouldn’t be much of a problem? Yes, that’s what I thought. But the editor is an editable menuitem — and a look at chrome://global/content/bindings/menulist.xml shows that you have to use a regular menulist if you want an image there.

