LibDevTools: Begin supporting the JavaScript console

This implements enough to execute JavaScript and reply with the result.
We do not yet support autocomplete or eager evaluation.
This commit is contained in:
Timothy Flynn 2025-02-24 11:55:46 -05:00 committed by Andreas Kling
commit 6d33b70e61
Notes: github-actions[bot] 2025-02-28 12:09:40 +00:00
8 changed files with 170 additions and 7 deletions

View file

@ -35,6 +35,9 @@ public:
virtual void highlight_dom_node(TabDescription const&, Web::UniqueNodeID, Optional<Web::CSS::Selector::PseudoElement::Type>) const { }
virtual void clear_highlighted_dom_node(TabDescription const&) const { }
using OnScriptEvaluationComplete = Function<void(ErrorOr<JsonValue>)>;
virtual void evaluate_javascript(TabDescription const&, String, OnScriptEvaluationComplete) const { }
};
}