Open gkalpak opened 8 years ago
This mostly affects batarang (which runs on Chrome only), but I don't see any reason not to play it safe(r), by hooking into both events. At least, this way it will be at least as good as it was before this PR.
@Narretz, PTAL.
The
beforeunload
event was never fired is the location was changed before the DOM content had been loaded (e.g. directly inside a<script>
tag. Theunload
event is fired more consistently.Fixes https://github.com/angular/batarang/issues/290