rem: if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString); if ( dataObj ) { 
add: if ( bestFlavor.value == "text/unicode" ) { if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString); if ( dataObj ) {  var id = dataObj.data.substring(0, len.value / 2); dump("ID: '" + id + "'\n"); } } else { if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString); if ( dataObj ) {  var id = dataObj.data.substring(0, len.value); dump("ID: '" + id + "'\n"); } } 
context:   function DropOnContentArea ( event )  {     var dropAccepted = false;        var dragService = Components.classes["component://netscape/widget/dragservice"].getService();    if ( dragService ) dragService = dragService.QueryInterface(Components.interfaces.nsIDragService);    if ( dragService ) {      var dragSession = dragService.getCurrentSession();      if ( dragSession ) {        var trans = Components.classes["component://netscape/widget/transferable"].createInstance();        if ( trans ) trans = trans.QueryInterface(Components.interfaces.nsITransferable);        if ( trans ) {          trans.addDataFlavor("text/plain");          for ( var i = 0; i < dragSession.numDropItems; ++i ) {            dragSession.getData ( trans, i );            var dataObj = new Object();            var bestFlavor = new Object();            var len = new Object();            trans.getAnyTransferData ( bestFlavor, dataObj, len );            if ( dataObj ) dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsString);            if ( dataObj ) {                          // pull the URL out of the data object              var id = dataObj.data.substring(0, len.value);              dump("ID: '" + id + "'\n");              // stuff it into the url field and go, baby, go!              var urlBar = document.getElementById ( "urlbar" );              urlBar.value = id;              BrowserLoadURL();                            event.preventBubble();                 }          } // foreach drag item        }      }    }  } // DropOnContentArea
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/713448c361a683a0e0905c5efb308d9ff6c0a2fa/navigator.js/clean/suite/browser/navigator.js