Files
servo/components/script_bindings/webidls/DebuggerEvalEvent.webidl
atbrakhi 9c43b52afb devtools: Implement function name preview in debugger popup (#42996)
The debugger preview popup was showing `function ()` for all functions.
This change implements support to show function name in the debugger
preview popup.

This is initial work towards showing other values in debugger preview
popup!

**Before:**
<img width="306" height="118" alt="image"
src="https://github.com/user-attachments/assets/5c090820-4862-4234-a6ea-50666f83c192"
/>


**After:**
<img width="282" height="128" alt="image"
src="https://github.com/user-attachments/assets/869a0122-c9da-4098-bb77-8a1110c29d48"
/>

<img width="286" height="137" alt="image"
src="https://github.com/user-attachments/assets/8655a8cb-bbd3-4b80-a297-daac58a6337f"
/>


Testing: Existing test passes
Fixes: Part of #36027

Signed-off-by: atbrakhi <atbrakhi@igalia.com>
2026-03-04 11:14:45 +00:00

43 lines
1.7 KiB
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
[Exposed=DebuggerGlobalScope]
interface DebuggerEvalEvent : Event {
readonly attribute DOMString code;
readonly attribute PipelineId pipelineId;
readonly attribute DOMString? workerId;
readonly attribute DOMString? frameActorId;
};
partial interface DebuggerGlobalScope {
undefined evalResult(DebuggerEvalEvent event, EvalResultValue result);
};
// Result from Debugger.Object.executeInGlobal() completion value.
// <https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Object.html#executeinglobal-code-options>
//
// Completion values are described at:
// <https://firefox-source-docs.mozilla.org/js/Debugger/Conventions.html#completion-values>
// - { return: value } for normal completion
// - { throw: value, stack } for thrown exception
// - null for termination
//
// The `value` inside is a debuggee value:
// <https://firefox-source-docs.mozilla.org/js/Debugger/Conventions.html#debuggee-values>
dictionary EvalResultValue {
required DOMString completionType;
required DOMString valueType;
boolean? booleanValue;
double? numberValue;
DOMString? stringValue;
// A string naming the ECMAScript [[Class]] of the referent.
// <https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.Object.html#accessor-properties-of-the-debugger-object-prototype>
DOMString? objectClass;
DOMString? name;
boolean? hasException;
};