Inspector.h 693 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibJS/Forward.h>
  8. #include <LibWeb/Bindings/PlatformObject.h>
  9. namespace Web::Internals {
  10. class Inspector final : public Bindings::PlatformObject {
  11. WEB_PLATFORM_OBJECT(Inspector, Bindings::PlatformObject);
  12. JS_DECLARE_ALLOCATOR(Inspector);
  13. public:
  14. virtual ~Inspector() override;
  15. void inspector_loaded();
  16. void inspect_dom_node(i32 node_id, Optional<i32> const& pseudo_element);
  17. void execute_console_script(String const& script);
  18. private:
  19. explicit Inspector(JS::Realm&);
  20. virtual void initialize(JS::Realm&) override;
  21. };
  22. }