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/resource-timing/#sec-performanceresourcetiming
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
13 [Exposed=(Window,Worker)]
14 interface PerformanceResourceTiming : PerformanceEntry
16 readonly attribute DOMString initiatorType;
17 readonly attribute DOMString nextHopProtocol;
19 readonly attribute DOMHighResTimeStamp workerStart;
21 [NeedsSubjectPrincipal]
22 readonly attribute DOMHighResTimeStamp redirectStart;
23 [NeedsSubjectPrincipal]
24 readonly attribute DOMHighResTimeStamp redirectEnd;
26 readonly attribute DOMHighResTimeStamp fetchStart;
28 [NeedsSubjectPrincipal]
29 readonly attribute DOMHighResTimeStamp domainLookupStart;
30 [NeedsSubjectPrincipal]
31 readonly attribute DOMHighResTimeStamp domainLookupEnd;
32 [NeedsSubjectPrincipal]
33 readonly attribute DOMHighResTimeStamp connectStart;
34 [NeedsSubjectPrincipal]
35 readonly attribute DOMHighResTimeStamp connectEnd;
36 [NeedsSubjectPrincipal]
37 readonly attribute DOMHighResTimeStamp secureConnectionStart;
38 [NeedsSubjectPrincipal]
39 readonly attribute DOMHighResTimeStamp requestStart;
40 [NeedsSubjectPrincipal]
41 readonly attribute DOMHighResTimeStamp responseStart;
43 readonly attribute DOMHighResTimeStamp responseEnd;
45 [NeedsSubjectPrincipal]
46 readonly attribute unsigned long long transferSize;
47 [NeedsSubjectPrincipal]
48 readonly attribute unsigned long long encodedBodySize;
49 [NeedsSubjectPrincipal]
50 readonly attribute unsigned long long decodedBodySize;
52 // TODO: Use FrozenArray once available. (Bug 1236777)
53 // readonly attribute FrozenArray<PerformanceServerTiming> serverTiming;
54 [SecureContext, Frozen, Cached, Pure, NeedsSubjectPrincipal]
55 readonly attribute sequence<PerformanceServerTiming> serverTiming;
57 [Default] object toJSON();