538308-1.xul 923 B

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0"?>
  2. <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  3. xmlns:html="http://www.w3.org/1999/xhtml"
  4. onload="run()">
  5. <tree id="tr" flex="1">
  6. <treecols>
  7. <treecol/>
  8. </treecols>
  9. <treechildren>
  10. <html:optgroup id="group">
  11. <html:option id="victim" label="never see this"/>
  12. </html:optgroup>
  13. </treechildren>
  14. </tree>
  15. <script type="text/javascript"><![CDATA[
  16. function run() {
  17. group = document.getElementById("group");
  18. tc = document.createElement("treechildren");
  19. group.appendChild(tc);
  20. v = document.getElementById("victim");
  21. v.parentNode.removeChild(v);
  22. v = null;
  23. tree = document.getElementById("tr");
  24. col = tree.columns[0];
  25. alert(tree.view.getItemAtIndex(1, col));
  26. }
  27. ]]></script>
  28. </window>