rem: case "cmdEditInsert": return false; 
add: case "cmdEditInsertAfter": return parentNode instanceof nsIDOMElement; case "cmdEditInsertBefore": return parentNode instanceof nsIDOMElement; case "cmdEditInsertFirstChild": return selectedNode instanceof nsIDOMElement; case "cmdEditInsertLastChild": return selectedNode instanceof nsIDOMElement; 
context:   isCommandEnabled: function(aCommand)  {    var clipboardNode = null;    var selectedNode = null;    var parentNode = null;    if (/^cmdEditPaste/.test(aCommand)) {      if (this.mPanel.panelset.clipboardFlavor != "inspector/dom-node")        return false;      clipboardNode = this.mPanel.panelset.getClipboardData();      selectedNode = new XPCNativeWrapper(viewer.selectedNode, "nodeType",                                          "parentNode", "childNodes");      if (selectedNode.parentNode)        parentNode = new XPCNativeWrapper(selectedNode.parentNode, "nodeType");    }    switch (aCommand) {      case "cmdEditPaste":      case "cmdEditPasteBefore":        return this.isValidChild(parentNode, clipboardNode);      case "cmdEditPasteReplace":        return this.isValidChild(parentNode, clipboardNode, selectedNode);      case "cmdEditPasteFirstChild":      case "cmdEditPasteLastChild":        return this.isValidChild(selectedNode, clipboardNode);      case "cmdEditPasteAsParent":        return this.isValidChild(clipboardNode, selectedNode) &&               this.isValidChild(parentNode, clipboardNode, selectedNode);      case "cmdEditInsert":        return false;      case "cmdEditCut":      case "cmdEditCopy":      case "cmdEditDelete":        return this.selectedNode != null;    }    return false;  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/d0334ea1d134f2fbc1dbe6f4897a81a697df4c4a/dom.js/buggy/extensions/inspector/resources/content/viewers/dom/dom.js