Обработчик событий, позволяющий прерывать события объекта window. (Недоступен для Firefox 2 и Safari).

TODO define what "abort" is. Closing the window via window manager? Stopping the load of the page? By which means and reasons (user, network/server)? At which stages would it fire / be catched? Для IE, событие onabort доступно только для тега img.


window.onabort = funcRef
  • funcRef: Reference to a function


window.onabort = function() {
  alert("Load aborted.");


Specification Status Comment
HTML Living Standard
Определение 'onabort' в этой спецификации.
Живой стандарт  

Browser Compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Да) ? ? ? ?
Feature Android Android Webview Chrome for Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support ? (Да) (Да) ? ? ? ? ?