Obviously, window.onbeforeunload has encountered its fair share of problems with Chrome as I\'ve seen from all the problems I\'ve encountered. What\'s the most recent work a
As of 69.0.3497.92, Chrome has not met the standard. However, there is a bug report filed, and a review is in progress.
window.addEventListener('beforeunload', function (e) {
// Cancel the event as stated by the standard.
e.preventDefault();
// Chrome requires returnValue to be set.
e.returnValue = '';
});
window.location = 'about:blank';