1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * https://w3c.github.io/navigation-timing/#the-performancetiming-interface
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
14 interface PerformanceTiming {
15 readonly attribute unsigned long long navigationStart;
16 readonly attribute unsigned long long unloadEventStart;
17 readonly attribute unsigned long long unloadEventEnd;
18 readonly attribute unsigned long long redirectStart;
19 readonly attribute unsigned long long redirectEnd;
20 readonly attribute unsigned long long fetchStart;
21 readonly attribute unsigned long long domainLookupStart;
22 readonly attribute unsigned long long domainLookupEnd;
23 readonly attribute unsigned long long connectStart;
24 readonly attribute unsigned long long connectEnd;
25 readonly attribute unsigned long long secureConnectionStart;
26 readonly attribute unsigned long long requestStart;
27 readonly attribute unsigned long long responseStart;
28 readonly attribute unsigned long long responseEnd;
29 readonly attribute unsigned long long domLoading;
30 readonly attribute unsigned long long domInteractive;
31 readonly attribute unsigned long long domContentLoadedEventStart;
32 readonly attribute unsigned long long domContentLoadedEventEnd;
33 readonly attribute unsigned long long domComplete;
34 readonly attribute unsigned long long loadEventStart;
35 readonly attribute unsigned long long loadEventEnd;
37 // This is a Chrome proprietary extension and not part of the
38 // performance/navigation timing specification.
39 // Returns 0 if a non-blank paint has not happened.
40 [Pref="dom.performance.time_to_non_blank_paint.enabled"]
41 readonly attribute unsigned long long timeToNonBlankPaint;
43 // Returns 0 if a contentful paint has not happened.
44 [Pref="dom.performance.time_to_contentful_paint.enabled"]
45 readonly attribute unsigned long long timeToContentfulPaint;
47 // This is a Chrome proprietary extension and not part of the
48 // performance/navigation timing specification.
49 // Returns 0 if a time-to-interactive measurement has not happened.
50 [Pref="dom.performance.time_to_first_interactive.enabled"]
51 readonly attribute unsigned long long timeToFirstInteractive;
53 [Default] object toJSON();