PerformanceResourceTiming.webidl (2664B)
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/resource-timing/#sec-performanceresourcetiming 8 * 9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C 10 * liability, trademark and document use rules apply. 11 */ 12 13 enum RenderBlockingStatusType { "blocking", "non-blocking" }; 14 15 [Exposed=(Window,Worker)] 16 interface PerformanceResourceTiming : PerformanceEntry 17 { 18 readonly attribute DOMString initiatorType; 19 readonly attribute DOMString nextHopProtocol; 20 21 readonly attribute DOMHighResTimeStamp workerStart; 22 23 [NeedsSubjectPrincipal] 24 readonly attribute DOMHighResTimeStamp redirectStart; 25 [NeedsSubjectPrincipal] 26 readonly attribute DOMHighResTimeStamp redirectEnd; 27 28 readonly attribute DOMHighResTimeStamp fetchStart; 29 30 [NeedsSubjectPrincipal] 31 readonly attribute DOMHighResTimeStamp domainLookupStart; 32 [NeedsSubjectPrincipal] 33 readonly attribute DOMHighResTimeStamp domainLookupEnd; 34 [NeedsSubjectPrincipal] 35 readonly attribute DOMHighResTimeStamp connectStart; 36 [NeedsSubjectPrincipal] 37 readonly attribute DOMHighResTimeStamp connectEnd; 38 [NeedsSubjectPrincipal] 39 readonly attribute DOMHighResTimeStamp secureConnectionStart; 40 [NeedsSubjectPrincipal] 41 readonly attribute DOMHighResTimeStamp requestStart; 42 [NeedsSubjectPrincipal] 43 readonly attribute DOMHighResTimeStamp responseStart; 44 45 readonly attribute DOMHighResTimeStamp responseEnd; 46 47 [NeedsSubjectPrincipal] 48 readonly attribute unsigned long long transferSize; 49 [NeedsSubjectPrincipal] 50 readonly attribute unsigned long long encodedBodySize; 51 [NeedsSubjectPrincipal] 52 readonly attribute unsigned long long decodedBodySize; 53 54 // https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-responsestatus 55 [NeedsSubjectPrincipal] 56 readonly attribute unsigned short responseStatus; 57 58 // https://w3c.github.io/server-timing/#extension-to-the-performanceresourcetiming-interface 59 [NeedsSubjectPrincipal] 60 readonly attribute DOMString contentType; 61 62 // TODO: Use FrozenArray once available. (Bug 1236777) 63 // readonly attribute FrozenArray<PerformanceServerTiming> serverTiming; 64 [SecureContext, Frozen, Cached, Pure, NeedsSubjectPrincipal] 65 readonly attribute sequence<PerformanceServerTiming> serverTiming; 66 67 [Pref="dom.element.blocking.enabled"] 68 readonly attribute RenderBlockingStatusType renderBlockingStatus; 69 70 [Default] object toJSON(); 71 };