XUL document dialog.xul shows a typical structure of a XUL document.
The behaviour of the XUL window is controlled by CSS script "dialogScript.js".
dialogScript.js adds a new browser tab to firefox.  (JS function doSomething() )