I need to catch the result of the leave-page user prompt fired in beforeunload. Below is my handler for beforeunload:
leaving = false; . . . window.addEventListen