// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
enum ScriptInvokerType {
"classic-script",
"module-script",
"execute-script",
"event-listener",
"user-callback",
"resolve-promise",
"reject-promise"
};
enum ScriptWindowAttribution {
"self", "descendant", "ancestor", "same-page", "other"
};
// https://github.com/w3c/longtasks/blob/loaf-explainer/loaf-explainer.md
[Exposed=Window, RuntimeEnabled=LongAnimationFrameTiming]
interface PerformanceScriptTiming : PerformanceEntry {
readonly attribute ScriptInvokerType invokerType;
readonly attribute DOMString invoker;
readonly attribute ScriptWindowAttribution windowAttribution;
readonly attribute DOMHighResTimeStamp executionStart;
readonly attribute DOMHighResTimeStamp forcedStyleAndLayoutDuration;
readonly attribute DOMHighResTimeStamp pauseDuration;
readonly attribute Window? window;
readonly attribute DOMString sourceURL;
readonly attribute DOMString sourceFunctionName;
readonly attribute long long sourceCharPosition;
[CallWith=ScriptState, ImplementedAs=toJSONForBinding] object toJSON();
};