rem:  var template = document.getElementById( "context-template" ); var items = template.childNodes; for ( var i = 0; i < items.length; i++ ) {     var item = this.cloneNode( items.item(i) );   item.setAttribute( "id", item.getAttribute( "id" ).replace( "template-", "context-" ) );   this.menu.appendChild( item ); }  
context:     initMenu : function ( popup, event ) {        // Save menu.        this.menu = popup;        // Get contextual info.        this.setTarget( document.popupNode );            // Populate menu from template.        var template = document.getElementById( "context-template" );        var items = template.childNodes;        for ( var i = 0; i < items.length; i++ ) {            // Replicate item.            //var item = items.item(i).cloneNode( false );                // cloneNode not implemented, fake it.            var item = this.cloneNode( items.item(i) );                // Change id.            item.setAttribute( "id", item.getAttribute( "id" ).replace( "template-", "context-" ) );                // Add it to popup menu.            this.menu.appendChild( item );        }        // Initialize (disable/remove) menu items.        this.initItems();    },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0e4600ac2413d8ea3a75e428514ddf50b514710e/nsContextMenu.js/clean/xpfe/browser/resources/content/nsContextMenu.js