rem: var RDF = GetRDFService(); 
add: var RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService().QueryInterface(Components.interfaces.nsIRDFService); 
context: function DropOnDirectoryTree(event){	debugDump("DropOnTree\n");    if (event.target.localName != "treecell" &&        event.target.localName != "treeitem")        return false;	var RDF = GetRDFService();	if (!RDF) return(false);	var treeRoot = dirTree;	if (!treeRoot)	return(false);	var treeDatabase = treeRoot.database;	if (!treeDatabase)	return(false);	// target is the <treecell>, and "id" is on the <treeitem> two levels above	var treeItem = event.target.parentNode.parentNode;	if (!treeItem)	return(false);	// drop action is always "on" not "before" or "after"	// get drop hint attributes	var dropBefore = treeItem.getAttribute("dd-droplocation");	var dropOn = treeItem.getAttribute("dd-dropon");	var dropAction;	if (dropOn == "true") 		dropAction = "on";	else		return(false);	var targetID = treeItem.getAttribute("id");	if (!targetID)	return(false);	debugDump("***targetID = " + targetID + "\n");	var dragService = GetDragService();	if ( !dragService )	return(false);		var dragSession = dragService.getCurrentSession();	if ( !dragSession )	return(false);	var trans = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable);	if ( !trans ) return(false);	trans.addDataFlavor("text/nsabcard");	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.nsISupportsWString);		if ( !dataObj )	continue;		// pull the URL out of the data object		var sourceID = dataObj.data.substring(0, len.value);		if (!sourceID)	continue;		debugDump("    Node #" + i + ": drop '" + sourceID + "' " + dropAction + " '" + targetID + "'");		debugDump("\n");		var sourceNode = RDF.GetResource(sourceID, true);		if (!sourceNode)			continue;				var targetNode = RDF.GetResource(targetID, true);		if (!targetNode) 			continue;		// Prevent dropping of a node before, after, or on itself		if (sourceNode == targetNode)	continue;		if (sourceID.substring(0,targetID.length) != targetID)		{			var cardResource = rdf.GetResource(sourceID);			var card = cardResource.QueryInterface(Components.interfaces.nsIAbCard);			if (card.isMailList == false)				card.dropCardToDatabase(targetID);		}	}	return(false);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e763e2b59cd62960c20cc9153cfb81cfeafa98a8/abDragDrop.js/buggy/mailnews/addrbook/resources/content/abDragDrop.js