Do unload work in 'unload' event handler instead of 'beforeunload'.
Do unload work in 'unload' event handler instead of 'beforeunload'.

In Atom, the 'beforeunload' event never prevents window from closing so
it in fact has the same effect with 'unload' event, I guess using
'beforeunload' instead of 'unload' is because the 'beforeunload' is
guarrenteed to happen when window is closing or application is quiting.
However in Atom Shell the 'unload' event is guarrenteed to happen on
both conditions, just like the 'beforeunload' in Atom, so it's safe to
replace the 'beforeunload' with 'unload' here.

And in Atom Shell, the 'beforeunload' event is mainly used for
preventing window from closing, just like the 'window:close' command in
Atom.

sotayamashita/atom,me6iaton/atom,kevinrenaers/atom,BogusCurry/atom,yamhon/atom,rjattrill/atom,gabrielPeart/atom,GHackAnonymous/atom,Abdillah/atom,sebmck/atom,hellendag/atom,fredericksilva/atom,rsvip/aTom,Austen-G/BlockBuilder,ezeoleaf/atom,mrodalgaard/atom,matthewclendening/atom,phord/atom,RobinTec/atom,BogusCurry/atom,johnrizzo1/atom,jacekkopecky/atom,Abdillah/atom,ezeoleaf/atom,originye/atom,Jdesk/atom,NunoEdgarGub1/atom,devmario/atom,burodepeper/atom,MjAbuz/atom,pombredanne/atom,kevinrenaers/atom,acontreras89/atom,bryonwinger/atom,mostafaeweda/atom,AdrianVovk/substance-ide,KENJU/atom,githubteacher/atom,sekcheong/atom,constanzaurzua/atom,kdheepak89/atom,vjeux/atom,darwin/atom,fang-yufeng/atom,targeter21/atom,ivoadf/atom,nvoron23/atom,crazyquark/atom,0x73/atom,rookie125/atom,alexandergmann/atom,githubteacher/atom,Dennis1978/atom,Hasimir/atom,Hasimir/atom,helber/atom,rmartin/atom,AlisaKiatkongkumthon/atom,Arcanemagus/atom,davideg/atom,ppamorim/atom,john-kelly/atom,vcarrera/atom,rjattrill/atom,yamhon/atom,jordanbtucker/atom,SlimeQ/atom,SlimeQ/atom,yomybaby/atom,t9md/atom,paulcbetts/atom,lisonma/atom,kandros/atom,targeter21/atom,dijs/atom,AdrianVovk/substance-ide,ralphtheninja/atom,gabrielPeart/atom,ppamorim/atom,0x73/atom,DiogoXRP/atom,mrodalgaard/atom,FoldingText/atom,liuxiong332/atom,AdrianVovk/substance-ide,kittens/atom,stuartquin/atom,deepfox/atom,ReddTea/atom,einarmagnus/atom,bj7/atom,basarat/atom,jacekkopecky/atom,lpommers/atom,brumm/atom,nrodriguez13/atom,crazyquark/atom,ali/atom,kjav/atom,ObviouslyGreen/atom,qiujuer/atom,sekcheong/atom,ReddTea/atom,mnquintana/atom,mnquintana/atom,isghe/atom,deoxilix/atom,elkingtonmcb/atom,Andrey-Pavlov/atom,avdg/atom,me6iaton/atom,rookie125/atom,john-kelly/atom,hpham04/atom,decaffeinate-examples/atom,tjkr/atom,andrewleverette/atom,jlord/atom,yangchenghu/atom,fang-yufeng/atom,AlisaKiatkongkumthon/atom,ReddTea/atom,sebmck/atom,efatsi/atom,einarmagnus/atom,Rychard/atom,Arcanemagus/atom,Abdillah/atom,SlimeQ/atom,liuxiong332/atom,prembasumatary/atom,vjeux/atom,vcarrera/atom,Jandersoft/atom,basarat/atom,pkdevbox/atom,bolinfest/atom,hakatashi/atom,russlescai/atom,andrewleverette/atom,hpham04/atom,constanzaurzua/atom,bencolon/atom,pengshp/atom,g2p/atom,bryonwinger/atom,jlord/atom,bolinfest/atom,synaptek/atom,ali/atom,ardeshirj/atom,gontadu/atom,nucked/atom,kjav/atom,fredericksilva/atom,abcP9110/atom,hharchani/atom,001szymon/atom,jjz/atom,ironbox360/atom,folpindo/atom,atom/atom,seedtigo/atom,yomybaby/atom,johnhaley81/atom,Abdillah/atom,hharchani/atom,svanharmelen/atom,0x73/atom,acontreras89/atom,ppamorim/atom,florianb/atom,kc8wxm/atom,Abdillah/atom,kdheepak89/atom,matthewclendening/atom,Jandersoft/atom,nucked/atom,dkfiresky/atom,woss/atom,MjAbuz/atom,johnhaley81/atom,johnrizzo1/atom,jlord/atom,Neron-X5/atom,ReddTea/atom,cyzn/atom,abcP9110/atom,Austen-G/BlockBuilder,rlugojr/atom,phord/atom,Austen-G/BlockBuilder,Rodjana/atom,vinodpanicker/atom,G-Baby/atom,mostafaeweda/atom,CraZySacX/atom,Arcanemagus/atom,fedorov/atom,Rodjana/atom,charleswhchan/atom,devmario/atom,decaffeinate-examples/atom,bsmr-x-script/atom,Jonekee/atom,mrodalgaard/atom,boomwaiza/atom,ObviouslyGreen/atom,hellendag/atom,amine7536/atom,omarhuanca/atom,Hasimir/atom,boomwaiza/atom,bencolon/atom,gisenberg/atom,tmunro/atom,Shekharrajak/atom,stinsonga/atom,fredericksilva/atom,lisonma/atom,Galactix/atom,jeremyramin/atom,kdheepak89/atom,bolinfest/atom,abcP9110/atom,hpham04/atom,me6iaton/atom,ppamorim/atom,dijs/atom,anuwat121/atom,GHackAnonymous/atom,bcoe/atom,devmario/atom,fang-yufeng/atom,rxkit/atom,alexandergmann/atom,AlexxNica/atom,FIT-CSE2410-A-Bombs/atom,prembasumatary/atom,isghe/atom,hharchani/atom,helber/atom,bj7/atom,fredericksilva/atom,GHackAnonymous/atom,FIT-CSE2410-A-Bombs/atom,stinsonga/atom,bsmr-x-script/atom,basarat/atom,jtrose2/atom,tony612/atom,charleswhchan/atom,codex8/atom,Jdesk/atom,kjav/atom,Rychard/atom,mdumrauf/atom,einarmagnus/atom,acontreras89/atom,ali/atom,qskycolor/atom,folpindo/atom,nvoron23/atom,batjko/atom,mdumrauf/atom,rmartin/atom,transcranial/atom,bsmr-x-script/atom,jacekkopecky/atom,rsvip/aTom,CraZySacX/atom,gisenberg/atom,basarat/atom,ObviouslyGreen/atom,cyzn/atom,abcP9110/atom,charleswhchan/atom,omarhuanca/atom,chfritz/atom,sillvan/atom,FoldingText/atom,NunoEdgarGub1/atom,anuwat121/atom,qskycolor/atom,yomybaby/atom,sxgao3001/atom,lovesnow/atom,synaptek/atom,execjosh/atom,dkfiresky/atom,pengshp/atom,sekcheong/atom,amine7536/atom,fedorov/atom,jacekkopecky/atom,sillvan/atom,sekcheong/atom,harshdattani/atom,hellendag/atom,rlugojr/atom,tisu2tisu/atom,oggy/atom,ivoadf/atom,mertkahyaoglu/atom,kjav/atom,bcoe/atom,gzzhanghao/atom,matthewclendening/atom,kjav/atom,Ingramz/atom,Locke23rus/atom,Austen-G/BlockBuilder,Shekharrajak/atom,palita01/atom,ashneo76/atom,kaicataldo/atom,qiujuer/atom,rsvip/aTom,sebmck/atom,GHackAnonymous/atom,qiujuer/atom,harshdattani/atom,Sangaroonaom/atom,devoncarew/atom,qiujuer/atom,scippio/atom,mostafaeweda/atom,toqz/atom,chengky/atom,crazyquark/atom,fedorov/atom,MjAbuz/atom,oggy/atom,001szymon/atom,mdumrauf/atom,pombredanne/atom,bencolon/atom,chengky/atom,paulcbetts/atom,n-riesco/atom,RobinTec/atom,davideg/atom,rmartin/atom,yangchenghu/atom,sxgao3001/atom,beni55/atom,pombredanne/atom,CraZySacX/atom,vinodpanicker/atom,targeter21/atom,mnquintana/atom,vinodpanicker/atom,n-riesco/atom,dannyflax/atom,Andrey-Pavlov/atom,Huaraz2/atom,dkfiresky/atom,davideg/atom,woss/atom,panuchart/atom,bcoe/atom,matthewclendening/atom,Jonekee/atom,t9md/atom,sxgao3001/atom,andrewleverette/atom,ralphtheninja/atom,hakatashi/atom,AlexxNica/atom,ReddTea/atom,seedtigo/atom,kittens/atom,elkingtonmcb/atom,russlescai/atom,hagb4rd/atom,RobinTec/atom,palita01/atom,omarhuanca/atom,basarat/atom,atom/atom,githubteacher/atom,acontreras89/atom,deepfox/atom,FoldingText/atom,YunchengLiao/atom,folpindo/atom,Galactix/atom,Ingramz/atom,jtrose2/atom,sebmck/atom,Shekharrajak/atom,execjosh/atom,DiogoXRP/atom,ykeisuke/atom,omarhuanca/atom,synaptek/atom,omarhuanca/atom,kdheepak89/atom,oggy/atom,Ju2ender/atom,sotayamashita/atom,ardeshirj/atom,ashneo76/atom,vcarrera/atom,Jandersolutions/atom,MjAbuz/atom,tony612/atom,targeter21/atom,Galactix/atom,tony612/atom,oggy/atom,hakatashi/atom,dsandstrom/atom,nvoron23/atom,svanharmelen/atom,Hasimir/atom,fscherwi/atom,niklabh/atom,kandros/atom,yalexx/atom,champagnez/atom,oggy/atom,abe33/atom,dannyflax/atom,ashneo76/atom,liuderchi/atom,wiggzz/atom,mnquintana/atom,KENJU/atom,fang-yufeng/atom,gisenberg/atom,Galactix/atom,rjattrill/atom,nvoron23/atom,burodepeper/atom,n-riesco/atom,jordanbtucker/atom,YunchengLiao/atom,sillvan/atom,deoxilix/atom,qskycolor/atom,panuchart/atom,targeter21/atom,wiggzz/atom,efatsi/atom,Locke23rus/atom,scippio/atom,ykeisuke/atom,chfritz/atom,decaffeinate-examples/atom,yamhon/atom,Hasimir/atom,mertkahyaoglu/atom,FoldingText/atom,bradgearon/atom,basarat/atom,lovesnow/atom,amine7536/atom,rlugojr/atom,hharchani/atom,YunchengLiao/atom,phord/atom,sebmck/atom,constanzaurzua/atom,yomybaby/atom,ali/atom,sillvan/atom,pkdevbox/atom,devmario/atom,mertkahyaoglu/atom,transcranial/atom,deepfox/atom,bryonwinger/atom,erikhakansson/atom,bryonwinger/atom,anuwat121/atom,Ju2ender/atom,ilovezy/atom,isghe/atom,chengky/atom,hharchani/atom,tony612/atom,FoldingText/atom,lovesnow/atom,lpommers/atom,ilovezy/atom,jlord/atom,florianb/atom,charleswhchan/atom,liuxiong332/atom,batjko/atom,florianb/atom,paulcbetts/atom,stinsonga/atom,kc8wxm/atom,hakatashi/atom,atom/atom,tanin47/atom,Rodjana/atom,kittens/atom,bradgearon/atom,avdg/atom,me-benni/atom,efatsi/atom,fedorov/atom,prembasumatary/atom,johnrizzo1/atom,fscherwi/atom,kc8wxm/atom,GHackAnonymous/atom,Ju2ender/atom,darwin/atom,amine7536/atom,abe33/atom,Dennis1978/atom,RuiDGoncalves/atom,ilovezy/atom,Austen-G/BlockBuilder,erikhakansson/atom,deepfox/atom,splodingsocks/atom,constanzaurzua/atom,rjattrill/atom,davideg/atom,xream/atom,001szymon/atom,gabrielPeart/atom,russlescai/atom,nrodriguez13/atom,yomybaby/atom,niklabh/atom,devoncarew/atom,jeremyramin/atom,xream/atom,constanzaurzua/atom,Ingramz/atom,john-kelly/atom,sxgao3001/atom,mostafaeweda/atom,ezeoleaf/atom,bcoe/atom,scv119/atom,rmartin/atom,dannyflax/atom,florianb/atom,sotayamashita/atom,codex8/atom,fang-yufeng/atom,dsandstrom/atom,matthewclendening/atom,MjAbuz/atom,Jonekee/atom,woss/atom,daxlab/atom,alfredxing/atom,Klozz/atom,dsandstrom/atom,Ju2ender/atom,vinodpanicker/atom,splodingsocks/atom,devmario/atom,Austen-G/BlockBuilder,PKRoma/atom,splodingsocks/atom,scv119/atom,vjeux/atom,me-benni/atom,prembasumatary/atom,Neron-X5/atom,RobinTec/atom,abe33/atom,john-kelly/atom,hpham04/atom,niklabh/atom,scv119/atom,dannyflax/atom,ali/atom,pombredanne/atom,helber/atom,DiogoXRP/atom,RuiDGoncalves/atom,mertkahyaoglu/atom,Klozz/atom,originye/atom,Jandersoft/atom,russlescai/atom,medovob/atom,yalexx/atom,jjz/atom,charleswhchan/atom,tjkr/atom,kevinrenaers/atom,NunoEdgarGub1/atom,Locke23rus/atom,liuderchi/atom,batjko/atom,prembasumatary/atom,mertkahyaoglu/atom,gzzhanghao/atom,Galactix/atom,Mokolea/atom,Huaraz2/atom,vhutheesing/atom,yalexx/atom,johnhaley81/atom,stuartquin/atom,dkfiresky/atom,tmunro/atom,ironbox360/atom,0x73/atom,vhutheesing/atom,toqz/atom,gzzhanghao/atom,liuderchi/atom,tisu2tisu/atom,pengshp/atom,toqz/atom,russlescai/atom,brettle/atom,lisonma/atom,yangchenghu/atom,einarmagnus/atom,mostafaeweda/atom,crazyquark/atom,liuderchi/atom,vinodpanicker/atom,alexandergmann/atom,erikhakansson/atom,Andrey-Pavlov/atom,me6iaton/atom,stuartquin/atom,florianb/atom,jtrose2/atom,Shekharrajak/atom,devoncarew/atom,jtrose2/atom,ardeshirj/atom,PKRoma/atom,BogusCurry/atom,Jandersolutions/atom,stinsonga/atom,decaffeinate-examples/atom,jlord/atom,fredericksilva/atom,Neron-X5/atom,jjz/atom,transcranial/atom,medovob/atom,Sangaroonaom/atom,dsandstrom/atom,sxgao3001/atom,dsandstrom/atom,Jandersolutions/atom,synaptek/atom,dannyflax/atom,vhutheesing/atom,AlbertoBarrago/atom,ilovezy/atom,hagb4rd/atom,kc8wxm/atom,jordanbtucker/atom,john-kelly/atom,g2p/atom,AlisaKiatkongkumthon/atom,woss/atom,jacekkopecky/atom,jeremyramin/atom,Huaraz2/atom,FIT-CSE2410-A-Bombs/atom,seedtigo/atom,chengky/atom,liuxiong332/atom,crazyquark/atom,kc8wxm/atom,brumm/atom,Jdesk/atom,Andrey-Pavlov/atom,me6iaton/atom,h0dgep0dge/atom,RobinTec/atom,G-Baby/atom,abcP9110/atom,t9md/atom,woss/atom,jtrose2/atom,brumm/atom,champagnez/atom,nrodriguez13/atom,amine7536/atom,n-riesco/atom,lovesnow/atom,alfredxing/atom,panuchart/atom,Jdesk/atom,sekcheong/atom,yalexx/atom,hagb4rd/atom,RuiDGoncalves/atom,burodepeper/atom,me-benni/atom,fscherwi/atom,palita01/atom,sillvan/atom,dkfiresky/atom,execjosh/atom,batjko/atom,ppamorim/atom,codex8/atom,kittens/atom,vcarrera/atom,h0dgep0dge/atom,cyzn/atom,Rychard/atom,kdheepak89/atom,pkdevbox/atom,davideg/atom,SlimeQ/atom,gisenberg/atom,rsvip/aTom,jjz/atom,KENJU/atom,gisenberg/atom,nucked/atom,qiujuer/atom,toqz/atom,lisonma/atom,scippio/atom,YunchengLiao/atom,kaicataldo/atom,splodingsocks/atom,ralphtheninja/atom,batjko/atom,rsvip/aTom,tisu2tisu/atom,Jandersoft/atom,FoldingText/atom,Jandersolutions/atom,synaptek/atom,g2p/atom,bcoe/atom,gontadu/atom,qskycolor/atom,Ju2ender/atom,AlbertoBarrago/atom,wiggzz/atom,darwin/atom,rxkit/atom,deepfox/atom,brettle/atom,KENJU/atom,hagb4rd/atom,paulcbetts/atom,avdg/atom,Jandersolutions/atom,kittens/atom,tanin47/atom,PKRoma/atom,lisonma/atom,codex8/atom,NunoEdgarGub1/atom,dannyflax/atom,Dennis1978/atom,isghe/atom,nvoron23/atom,rxkit/atom,ivoadf/atom,Neron-X5/atom,YunchengLiao/atom,codex8/atom,AlexxNica/atom,Neron-X5/atom,rmartin/atom,lpommers/atom,dijs/atom,G-Baby/atom,fedorov/atom,n-riesco/atom,isghe/atom,hagb4rd/atom,AlbertoBarrago/atom,Mokolea/atom,tanin47/atom,vcarrera/atom,harshdattani/atom,Shekharrajak/atom,chengky/atom,toqz/atom,jacekkopecky/atom,champagnez/atom,originye/atom,devoncarew/atom,yalexx/atom,brettle/atom,daxlab/atom,h0dgep0dge/atom,alfredxing/atom,deoxilix/atom,NunoEdgarGub1/atom,tony612/atom,einarmagnus/atom,rookie125/atom,KENJU/atom,hpham04/atom,ilovezy/atom,elkingtonmcb/atom,Andrey-Pavlov/atom,tjkr/atom,boomwaiza/atom,bj7/atom,ykeisuke/atom,vjeux/atom,kaicataldo/atom,chfritz/atom,bradgearon/atom,tmunro/atom,acontreras89/atom,SlimeQ/atom,jjz/atom,beni55/atom,qskycolor/atom,gontadu/atom,vjeux/atom,Mokolea/atom,Klozz/atom,Jandersoft/atom,svanharmelen/atom,beni55/atom,liuxiong332/atom,xream/atom,medovob/atom,devoncarew/atom,ironbox360/atom,scv119/atom,mnquintana/atom,pombredanne/atom,h0dgep0dge/atom,Jdesk/atom,Sangaroonaom/atom,ezeoleaf/atom,lovesnow/atom,kandros/atom,daxlab/atom