markFullyLoaded Method
.png)
[This documentation is preliminary and is subject to change.]
Sets a location for the built-in fullyloaded performance mark.
Syntax
MSPerformance.markFullyLoaded()
Return Value
No return value.
Remarks
The
fullyloadedperformance mark indicates the location in a webpage where the page can be considered fully loaded. Because webpages vary in design and purpose, this location is left to the discretion of the page author.Use the markFullyLoaded method to indicate the location of the fullyLoaded performance mark; this allows the fullyLoaded performance measure to be calculated.
Example
The following example shows how to use the markFullyLoaded method to set the location for the
fullyloadedperformance mark.<!DOCTYPE html> <head> <meta http-equiv="x-ua-compatible" content="ie=9"> <script type="text/javascript"> function doLoop() { var maxIter = 500000; var fib = 0; var fibn_1 = 0; var fibn_2 = 1; for (var i = 0; i < maxIter; i++) { fib = (fib == 0) ? 0 : fib; fib = fibn_1 + fibn_2; fibn_2 = fibn_1; fibn_1 = fib; } } </script> </head> <body> <script type="text/javascript"> try { // The doLoop() function represents work required to // initialize the webpage. doLoop(); var oPerformance = window.msPerformance; oPerformance.markFullyLoaded(); iMyLoopMS = oPerformance.timingMeasures.fullyLoaded; alert( "The webpage took " + iMyLoopMS.toString() + " ms to load fully." ); } catch( oErr ) { var str = "Error " + oErr.code + ": " + oErr.message; alert( str ); }; </script> </body> </html>
Standards Information
There is no public standard that applies to this method.
Applies To
MSPerformance
See Also