Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SVGAbort | onabort event

Occurs when page loading is stopped before an element is loaded completely.

Scalable Vector Graphics: Scripting, Section 18.4.3Internet Explorer 9



HTML Attribute <element onabort = "handler(event)">
Event Property object.onabort = handler;
attachEvent Method object.attachEvent("onabort", handler)
addEventListener Method object.addEventListener("SVGAbort", handler, useCapture)


Event information



Event handler parameters

pEvt [in]

Type: IDOMUIEvent

The IDOMEvent object.

Standards information


The onabort event occurs when page loading is stopped before an element is loaded completely.

The target of the event is the svg element.

The designated element stops loading.

To invoke this event, do one of the following:

  • The user presses the browser's stop button before the element is loaded completely.


The following code example shows how to handle the onabort event.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
<svg id="outerSvgElement"
     width="600px" height="210px" version="1.1" 
     xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- Required for xlink usage. -->
  <script type="application/ecmascript">
    function handleAbortEvent(evt) {
      // Handle the abort event here.
    window.onload = function() {
      var e = document.documentElement; // Root element is svg
        For the svg element, add an event listener for the onabort event.
        addEventListener parameters: event type, event listener pointer, 'false' = bubbling.
      e.addEventListener('SVGAbort', handleAbortEvent, false);

See also




© 2015 Microsoft