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/. 5 * 6 * The origin of this IDL file is 7 * https://w3c.github.io/navigation-timing/#the-performancetiming-interface 8 * 9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 10 * liability, trademark and document use rules apply. 11 */ 12 13[Exposed=Window] 14interface 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; 36 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; 42 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; 46 47 // This is a Mozilla proprietary extension and not part of the 48 // performance/navigation timing specification. It marks the 49 // completion of the first presentation flush after DOMContentLoaded. 50 [Pref="dom.performance.time_to_dom_content_flushed.enabled"] 51 readonly attribute unsigned long long timeToDOMContentFlushed; 52 53 // This is a Chrome proprietary extension and not part of the 54 // performance/navigation timing specification. 55 // Returns 0 if a time-to-interactive measurement has not happened. 56 [Pref="dom.performance.time_to_first_interactive.enabled"] 57 readonly attribute unsigned long long timeToFirstInteractive; 58 59 [Default] object toJSON(); 60}; 61