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 * http://www.w3.org/TR/hr-time/
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
13 typedef double DOMHighResTimeStamp;
14 typedef sequence <PerformanceEntry> PerformanceEntryList;
16 [Exposed=(Window,Worker)]
17 interface Performance {
18 DOMHighResTimeStamp now();
22 partial interface Performance {
24 readonly attribute PerformanceTiming timing;
26 readonly attribute PerformanceNavigation navigation;
31 // http://www.w3.org/TR/performance-timeline/#sec-window.performance-attribute
33 partial interface Performance {
34 [Pref="dom.enable_resource_timing"]
35 PerformanceEntryList getEntries();
36 [Pref="dom.enable_resource_timing"]
37 PerformanceEntryList getEntriesByType(DOMString entryType);
38 [Pref="dom.enable_resource_timing"]
39 PerformanceEntryList getEntriesByName(DOMString name, optional DOMString
43 // http://www.w3.org/TR/resource-timing/#extensions-performance-interface
45 partial interface Performance {
46 [Pref="dom.enable_resource_timing"]
47 void clearResourceTimings();
48 [Pref="dom.enable_resource_timing"]
49 void setResourceTimingBufferSize(unsigned long maxSize);
50 [Pref="dom.enable_resource_timing"]
51 attribute EventHandler onresourcetimingbufferfull;