Benchmarking Page Load Performance ================================== The "benchmark" event should be fired after the page has loaded and painted, but before it has fired any timeouts. In particular: After the benchmark event has fired, assuming no timeouts have been set up, assuming no keyboard or mouse inputs, and assuming no animated resources form part of the page, the display should not change. This includes the browser's UI. All inline scripts and onload handlers should have run to completion before the benchmark event is fired. All subresources (stylesheets, alternate stylesheets, images, external scripts, background images, etc) should have loaded before the benchmark event is fired, unless such resources would not be loaded at all without further user action (for example, alternate stylesheets if these are loaded on demand, images while images are disabled, backgrounds for parts of the page that are not displayed if these are loaded on demand, etc). Note, however, that it can be a privacy violation bug to not load all backgrounds and other resources mentioned in a stylesheet, and that if alternate stylesheets are loaded on demand, scripts may need to load stylesheets synchronously if they try to access such sheets dynamically. The page must have painted and be displayed on the user's screen, including taking into account any changes caused by onload handlers. The onload handlers mentioned above include any relevant DOM2 and DOM3 event observers. Upon meeting the above conditions, the UA should fire a "benchmark" event at the |document| node, which bubbles, is not cancellable, and has no context information. In DOM3 Events processors, the "benchmark" event has the namespace "http://www.hixie.ch/specs/onbenchmark". The UA should also execute any script contained in any "onbenchmark" attribute on the node if the document is an HTML 4.x or XHTML 1.x document. A DOM application may use the hasFeature(feature, version) method of the DOMImplementation interface with parameter values "BenchmarkEvent" and "1.0" (respectively) to determine whether or not this event module is supported by the implementation. In order to fully support this module, an implementation must also support the "Events" feature defined in the DOM Level 2 Events specification. Please, refer to additional information about conformance in the DOM Level 2 Core specification [DOM Level 2 Core]. ------------------------------------------------------------------------