added support for createPopup()