angular-hint icon indicating copy to clipboard operation
angular-hint copied to clipboard

fix(hint): properly clean up when location is changed before DOM content has been loaded

Open gkalpak opened this issue 9 years ago • 1 comments

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. The unload event is fired more consistently.

Fixes https://github.com/angular/batarang/issues/290

gkalpak avatar Mar 18 '16 18:03 gkalpak

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.

gkalpak avatar May 02 '17 11:05 gkalpak