Excuse me, how to monitor the close button in the upper left corner of Wechat's built-in browser?

excuse me, how to monitor the close button in the upper left corner of Wechat"s built-in browser? Ask the gods to give me some help!

Mar.23,2021

it just so happens that this requirement has been made recently

https://github.com/chenyungcs.

beforeUnload is not available in safari. Use pageHide

in Safari.
beforeunload


there is no solution, but you can listen for page refresh or shutdown events, onbeforeunload events


I don't know what requirements you want to achieve. If you want to block or prompt when the page is closed, you can use the popstate event to implement

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eadb13-2177.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eadb13-2177.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?