Pass event object as an argument of 'dragend' event handler
Add add_popup() method to make possible to register popup from a plugin.
It was possible with show_popup(), however sometimes it is needed
to register a popup before show_popup() is being used.