rem: var RDFC = Components.classes["component: RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC)	return(false); 
add: var RDFC_uri = "component: var RDFC = Components.classes[RDFC_uri].getService(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); if (!RDFC) return false; 
context: function doDelete(promptFlag){	var treeNode = document.getElementById("bookmarksTree");	if (!treeNode)    return(false);	var select_list = treeNode.selectedItems;	if (!select_list)	return(false);	if (select_list.length < 1)    return(false);	debug("# of Nodes selected: " + select_list.length);	if (promptFlag == true)	{		var bundle = srGetStrBundle("chrome://communicator/locale/bookmarks/bookmark.properties");		var deleteStr = bundle.GetStringFromName("DeleteItems");		var ok = confirm(deleteStr);		if (!ok)	return(false);	}	var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService();	RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);	if (!RDF)	return(false);	var RDFC = Components.classes["component://netscape/rdf/container"].getService();	RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer);	if (!RDFC)	return(false);	var Bookmarks = RDF.GetDataSource("rdf:bookmarks");	if (!Bookmarks)	return(false);	var dirty = false;	// note: backwards delete so that we handle odd deletion cases such as	//       deleting a child of a folder as well as the folder itself	for (var nodeIndex=select_list.length-1; nodeIndex>=0; nodeIndex--)	{		var node = select_list[nodeIndex];		if (!node)    continue;		var ID = node.getAttribute("id");		if (!ID)    continue;		// don't allow deletion of various "special" folders		if ((ID == "NC:BookmarksRoot") || (ID == "NC:IEFavoritesRoot"))		{			continue;		}		var parentID = node.parentNode.parentNode.getAttribute("ref");		if (!parentID)	parentID = node.parentNode.parentNode.getAttribute("id");		if (!parentID)	continue;		debug("Node " + nodeIndex + ": " + ID);		debug("Parent Node " + nodeIndex + ": " + parentID);		var IDRes = RDF.GetResource(ID);		if (!IDRes)	continue;		var parentIDRes = RDF.GetResource(parentID);		if (!parentIDRes)	continue;		RDFC.Init(Bookmarks, parentIDRes);		RDFC.RemoveElement(IDRes, true);		dirty = true;	}	if (dirty == true)	{		var remote = Bookmarks.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);		if (remote)		{			remote.Flush();			debug("Wrote out bookmark changes.");		}	}	return(true);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/e9736d961a24945c2f31d67dc799c3c803d7729a/bookmarks.js/clean/xpfe/components/bookmarks/resources/bookmarks.js