add:    var transferableForSelection = this.createInstance( "component: "nsITransferable" );  if ( clipboard && transferableForSelection ) { transferableForSelection.addDataFlavor( "text/unicode" );  var data = this.createInstance( "component: "nsISupportsWString" ); if ( data ) { data.data = text ; transferableForSelection.setTransferData( "text/unicode", data, text.length * 2 );  clipboard.setData( transferableForSelection, null, Components.interfaces.nsIClipboard.kSelectionClipboard ); } }   
context:     copyToClipboard : function ( text ) {        // Get clipboard.        var clipboard = this.getService( "component://netscape/widget/clipboard",                                         "nsIClipboard" );        // Create tranferable that will transfer the text.        var transferable = this.createInstance( "component://netscape/widget/transferable",                                                "nsITransferable" );        if ( clipboard && transferable ) {          transferable.addDataFlavor( "text/unicode" );          // Create wrapper for text.          var data = this.createInstance( "component://netscape/supports-wstring",                                          "nsISupportsWString" );          if ( data ) {            data.data = text ;            transferable.setTransferData( "text/unicode", data, text.length * 2 );            // Put on clipboard.            clipboard.setData( transferable, null, Components.interfaces.nsIClipboard.kGlobalClipboard );          }        }    },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/386d4a7d9bd9a7502f7e851e4d493f3e1ea6c978/nsContextMenu.js/buggy/xpfe/browser/resources/content/nsContextMenu.js