blob: 91d2e8e5a939b121b5ed443b8d30de2567aa405f [file] [log] [blame]
// Copyright 2015 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// https://www.w3.org/TR/navigation-timing/#performance
interface Performance {
readonly attribute PerformanceTiming timing;
// Chromium custom member.
readonly attribute MemoryInfo memory;
// Performance Resource Timing extensions to the Performance interface.
// https://w3c.github.io/resource-timing/#sec-extensions-performance-interface
void clearResourceTimings ();
void setResourceTimingBufferSize (unsigned long maxSize);
attribute EventHandler onresourcetimingbufferfull;
// Web API: User Timing extensions to Performance
// https://www.w3.org/TR/2019/REC-user-timing-2-20190226/#extensions-performance-interface
[RaisesException] void mark(DOMString name);
[RaisesException] void measure(
DOMString measureName,
optional DOMString startMark = "",
optional DOMString endMark = "");
void clearMarks(optional DOMString name = "");
void clearMeasures(optional DOMString measureName = "");
};