added onClose, onTitleChange event to widget