Note: This handler is triggered when the event reaches the window, not the body element. Use {{ domxref("element.addEventListener","addEventListener()") }} to attach an event listener to the body element.

onerror

{{domxref("EventHandler")}}

Exposes the {{ domxref("window.onerror") }} event handler to call when the document fails to load properly.

Note: This handler is triggered when the event reaches the window, not the body element. Use {{ domxref("element.addEventListener","addEventListener()") }} to attach an event listener to the body element.

Note: This handler is triggered when the event reaches the window, not the body element. Use {{ domxref("element.addEventListener","addEventListener()") }} to attach an event listener to the body element.

onhashchange

{{domxref("EventHandler")}}

Reflects the {{ htmlattrxref("onhashchange", "body") }} HTML attribute value for a function to call when the fragment identifier in the address of the document changes.

Note: This handler is triggered when the event reaches the window, not the body element. Use {{ domxref("element.addEventListener","addEventListener()") }} to attach an event listener to the body element.

onmessage

{{domxref("EventHandler")}}

Reflects the {{ htmlattrxref("onmessage", "body") }} HTML attribute value for a function to call when the document receives a message.