views:

686

answers:

2

I am currently developing a Firefox extension. In Firefox's extension you can display a window by calling window.open and specifying the XUL file for that window. You can make it a dialog and/or modal. But there is no way to make the window frameless (no title bar and window borders) and I understand that. Also, it is not possible to make the body of the window transparent (but not the controls within it), Also I understand why.

I know that there is a work around to do transparent window in a non-standard way. But this does not remove the frame of the window. What I would like to ask is if there is someone out there who knows a way to achieve such thing, frameless and transparent window. Or maybe at least was able to achieve frameless window. I would be happy to get any suggestions even though they are not the perfect solution.

Thank you.

Edit:

The transparent or frameless window must be based on Firefox GUI, and not based on the HTML of the page (i.e. I am not seeking to modify the HTML of the page to show a window with javascript that is part of the HTML document). Any solution that is not based on the HTML of the current page is accepted.

A: 

The problem is that this doesn't work the same across platforms. Window decorations and transparency are controlled by the window manager, and has to be done differently for Windows, Linux and Mac. Probably even for each version and service pack.

You'd will need to include platform-specific libraries for your extension and get control over the window you want to make transparent. The code that then makes the window transparent isn't tied to Firefox and should probably be discussed in another question.

Otto Allmendinger
+2  A: 

You won't be able to accomplish this with windows. You can, however, accomplish what you want with a xul:panel element. You can use standard CSS to make it transparent, and control where it opens. For more details about panels, see the popup guide for them.

sdwilsh
I have used this method successfully. One warning: on Windows, you need to set the panel's border CSS attribute to "none".
Joel Anair