mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 22:37:36 +00:00
Ladybird: Implement a JavaScript console for the AppKit chrome
This adds menu items to open an interactive JavaScript console for a web page. This more or less mimics the Qt implementation of the console. Hooks are included to tie the lifetime of the console window with the tab it belongs to; if the tab is closed, the console window is closed.
This commit is contained in:
parent
bf59e06d2a
commit
4d26e4650f
11 changed files with 306 additions and 0 deletions
22
Ladybird/AppKit/UI/Console.h
Normal file
22
Ladybird/AppKit/UI/Console.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#import <System/Cocoa.h>
|
||||
|
||||
@class LadybirdWebView;
|
||||
@class Tab;
|
||||
|
||||
@interface Console : NSWindow
|
||||
|
||||
- (instancetype)init:(Tab*)tab;
|
||||
|
||||
- (void)reset;
|
||||
|
||||
@property (nonatomic, strong) LadybirdWebView* web_view;
|
||||
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue