-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecating the unload event #980
Comments
I made a small fix because it’s urgent, it might be useful to someone. Do not judge strictly. |
I notice this problem for years. I decided to fix it. So i did it in this way: First of all, use unminified version of js, after fixing minify it again. Replace "proto.onUnload = function" function with this function:
also add this function below this function:
then find "proto.createHistoryAppend = function()" function, replace it this one:
finally, replace "proto.bindHistoryAppendEvents = function(isBind)" function with this one:
I did not encounter any problems when I made changes this way. If you encounter any problems, I would appreciate it if you let me know. |
Good day.
There is an "unload" event in the source code, chromium browsers are already complaining about it. Currently, I noticed that on mobile devices like chromium, unload does not fire or does not always fire, the return cache does not work correctly.
What is the correct way to replace it with “pagehide” or “beforeunload” or "visibilitychange"?
Google Deprecating the unload event
The text was updated successfully, but these errors were encountered: