Convert beforeunload listeners
This commit is contained in:
parent
002ff45312
commit
7afd0a02e8
4 changed files with 12 additions and 4 deletions
|
@ -133,6 +133,14 @@
|
|||
return appWindow.contentWindow;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
beforeUnload: function(callback) {
|
||||
if (chrome.runtime) {
|
||||
chrome.runtime.onSuspend.addListener(callback);
|
||||
} else {
|
||||
window.addEventListener('beforeunload', callback);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue