| TDAT: public IMenuitem insertItemAt(int index, String label) { | |
| IMenuitem menuitem = (IMenuitem) this.getOwnerDocument() | |
| .createElementNS(XulConstants.XUL_NAMESPACE_URI, | |
| XulConstants.MENUITEM_ELEMENT); | |
| menuitem.setAttribute("label", label); | |
| NodeList nodes = menupopup.getElementsByTagNameNS( | |
| XulConstants.XUL_NAMESPACE_URI, XulConstants.MENUITEM_ELEMENT); | |
| IMenuitem item = (IMenuitem) nodes.item(index); | |
| menupopup.insertBefore(menuitem, item); | |
| ((MenupopupImpl) menupopup).addComboItem(index, menuitem); | |
| return menuitem; | |
| } | |
| COM: <s> creates a new menuitem element and inserts it at a specific position in </s> | |