Skip to content

Instantly share code, notes, and snippets.

@weizman
Last active January 30, 2019 22:19
Embed
What would you like to do?
demonstrate how normal actions can be performed within an `unload` event listener except for breakpoints
window.addEventListener('unload', (e) => {
console.log('unloading!'); // would successfully log to console
localStorage.setItem('key', 'value'); // would successfully set new item to local storage
debugger; // would fail to break at this point!
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment