Use addEventListener to trigger 'beforeunload' event to avoid overwriting/overwritten global (Re)[Delivers #67711668]