Q:

XUL: Getting drop target ID

The following code is used for listbox items supposed to get the ID of the source and target items. It works for getting the source and stores it in the data variable. But data2 only retrieves the ID if the target list item is empty. If the target has text it doesn't work. 
How can I get the id of the list item and not the tags inside the list item?
Thanks.
drop: function(event){

    var data = event.dataTransfer.getData("text/plain");
    var data2 = event.target.id;
    alert("DROPPED: "+data+" "+data2);
    event.preventDefault();
}

A:

Personally, I would use the property parentNode and keep going up in the hierachy until I find something of type list item.

