mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibWeb+LibWebView+WebContent: Add an Inspector IDL object to the Window
This is an internal object that must be explicitly enabled by the chrome before it is added to the Window. The Inspector object will be used by a special WebView that will replace all chrome-specific inspector windows. The IDL defines methods that this WebView will need to inform the chrome of various events, such as the user clicking a DOM node.
This commit is contained in:
parent
30e96749de
commit
ffdc2d8add
21 changed files with 156 additions and 1 deletions
30
Userland/Libraries/LibWeb/Internals/Inspector.h
Normal file
30
Userland/Libraries/LibWeb/Internals/Inspector.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
|
||||
namespace Web::Internals {
|
||||
|
||||
class Inspector final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(Inspector, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(Inspector);
|
||||
|
||||
public:
|
||||
virtual ~Inspector() override;
|
||||
|
||||
void inspector_loaded();
|
||||
void inspect_dom_node(i32 node_id, Optional<i32> const& pseudo_element);
|
||||
|
||||
private:
|
||||
explicit Inspector(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue