beforeunload

trigger input event❓ input then delete

https://github.com/mdn/content/pull/29703/commits/acbf3ebbb70ac1e09d3c86aad75487c1f3268e3c

谷歌、火狐、edge等浏览器中被优化了,需要用户在页面有过未保存的内容的操作才会出现提示!⚠️