I am creating a firefox extension that has a button on the toolbar that will show below custom content that i will set.
I was using a XUL file to create the structure of this content, and i was opening it like this:
var config = { confirm: false ,
username:"",
password:""};
window.openDialog( "chrome://myext/content/login.xul",
"",
"centerscreen=no,all=no,titlebar=no,chrome=yes,
toolbar=no,dialog=no,resizable=no,modal=yes",
config);
Now i'm taking another approach, by using an iframe inside a panel to dynamically use one of multiple xul files as src. Here's the xul:
<toolbarpalette id="BrowserToolbarPalette">
<toolbarbutton id="myextToolbarIcon"
image='chrome://myext/content/images/myext-mini-logo.png'
type="panel"
class="toolbarbutton-1 chromeclass-toolbar-additional"
tooltiptext="myext">
<panel id="myext-panel"
type="arrow"
noautofocus="true"
consumeoutsideclicks="true"
onpopupshowing="startscreen(event);"
level="top">
<hbox id="myext-panel-container" align="top">
<iframe id="myext-toolbar-menu" flex="1"/>
</hbox>
</panel>
</toolbarbutton>
</toolbarpalette>
Is there a similar way of sending that "config" variable to the xul file, as it happens with openDialog?