unloadEventStart property

If the previous document and the current document have the same origin, the unloadEventStart property must return the time immediately before the user agent starts the unload event of the previous document. If there is no previous document or the previous document has a different origin than the current document, this attribute must return zero.

Internet Explorer 9

Syntax

JavaScript

p = object.unloadEventStart

Property values

Type: Integer

An Integer value that represents the time immediately before the user agent starts the unload event of the previous document.

Standards information

Remarks

The value reported by the unloadEventStart property represents the number of milliseconds between the recorded time and midnight January 1, 1970 (UTC).

Windows Internet Explorer 9. This property is supported only for documents displayed in IE9 Standards mode. For more information, see Defining Document Compatibility.

Examples

The following example shows how to calculate the time required to unload the previously loaded document from the window object.


var oTiming = window.performance.timing;
var iTimeMS = oTiming.unloadEventEnd - oTiming.unloadEventStart;

See also

performanceTiming
unloadEventEnd

 

 

Show:
© 2014 Microsoft