XUL <tree> drag and drop

I hope there are still XUL experts around who are able to answer this question!

I have been working on making my Thunderbird add-on compatible with Thunderbird 60, which contains many changes such as removal of RDF templates in XUL.

The user-generated data in my add-on is stored in RDF, and in the past I was able to use RDF templates to build the XUL <tree> element to represent the user’s data. Now that RDF templates have been eliminated, I’ve had to convert the tree into a content tree (i.e. explicitly build all the nodes within the <tree>). I finally got that working – except that the ability to drag tree nodes and drop them into container nodes (i.e. folders) to rearrange items within the <tree> is missing.

With RDF templates, I was able to define an nsIXULTreeBuilderObserver object to handle drag and drop events within the <tree>, but as I understand it, this is not available in a content tree. What alternatives do I have for implementing drag and drop within a <tree> now that RDF templates are gone?


P.S.: I am aware that there are plans to eventually eliminate support for RDF, but the transition to a different data store is not something I can do quickly, hence the need to stay with RDF for the short term.