This repository was archived by the owner on Apr 4, 2025. It is now read-only.
Commit 97c16a2
committed
fix(hint): properly clean up when location is changed before DOM content has been loaded
The `beforeunload` event was never fired if the location was changed before the DOM content had
been loaded (e.g. directly inside a `<script>` tag). The `unload` event is fired more consistently.
This commit listens for both events to cover more potential browser bugs/edge-cases.
Fixes angular/batarang#2901 parent aab2964 commit 97c16a2
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
| 66 | + | |
60 | 67 | | |
61 | | - | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
0 commit comments