I am trying to add a dialog box using XUL to a Firefox extension that already has an overlay xul defined. I tried adding the dialog code in the same overlay.xul file, but run into a "dialog.getButton is not a function" error in the Error Console. The structure of the file looks like this:
<overlay id="xxx" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
... code...
<dialog id="yyy"
buttons=","
onload="onLoad();">
....
</dialog>
</overlay>
If I separate out the dialog xul code into a different file, then everything seems to work. The difference is that in the separate dialog.xul file, the dialog code looks like this:
<dialog id=yyy"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
buttons=","
onload="onLoad();">
...
</dialog>
Is it possible or correct to add the dialog code in the same overlay XUL file or should I actually separate them? Is it ok to have multiple XUL files for the same extension?