mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
Browser: Add "Inspect Element" to context menu :^)
This opens the DOM Inspector window, with the target element already selected. (If the window is already open, it just selects the element.) Note that this only applies to single-process mode for now. In OOP mode, the "inspect element" action is disabled.
This commit is contained in:
parent
8eef509c1b
commit
37f060b873
6 changed files with 69 additions and 19 deletions
|
@ -64,6 +64,12 @@ public:
|
|||
Function<void(const URL&, const Web::Cookie::ParsedCookie& cookie, Web::Cookie::Source source)> on_set_cookie;
|
||||
Function<void()> on_dump_cookies;
|
||||
|
||||
enum class InspectorTarget {
|
||||
Document,
|
||||
HoveredElement
|
||||
};
|
||||
void show_inspector_window(InspectorTarget);
|
||||
|
||||
const String& title() const { return m_title; }
|
||||
const Gfx::Bitmap* icon() const { return m_icon; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue