libFSS: better JS event sync for formPopup calls