<xul xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="boom();">

<script>

function boom()
{
  var XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

  var newListbox = document.createElementNS(XUL_NS, "listbox");
  document.getElementById("listbox").appendChild(newListbox);

  var newHbox = document.createElementNS(XUL_NS, "hbox");
  document.getElementById("listitem").appendChild(newHbox);
}

</script>

<listbox id="listbox"><listitem id="listitem" /></listbox>

</xul>
