mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
headless-browser: Install EventLoop and Font plugins so it doesn't crash
This commit is contained in:
parent
6b2a916069
commit
fb2e1c4611
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,8 @@
|
|||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
#include <LibWeb/Painting/PaintableBox.h>
|
||||
#include <LibWeb/Platform/EventLoopPluginSerenity.h>
|
||||
#include <LibWeb/Platform/FontPluginSerenity.h>
|
||||
#include <LibWeb/Platform/ImageCodecPlugin.h>
|
||||
#include <LibWeb/WebSockets/WebSocket.h>
|
||||
#include <LibWebSocket/ConnectionInfo.h>
|
||||
|
@ -668,6 +670,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_positional_argument(url, "URL to open", "url", Core::ArgsParser::Required::Yes);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
Web::Platform::EventLoopPlugin::install(*new Web::Platform::EventLoopPluginSerenity);
|
||||
Web::Platform::FontPlugin::install(*new Web::Platform::FontPluginSerenity);
|
||||
Web::Platform::ImageCodecPlugin::install(*new ImageCodecPluginHeadless);
|
||||
Web::ResourceLoader::initialize(HeadlessRequestServer::create());
|
||||
Web::WebSockets::WebSocketClientManager::initialize(HeadlessWebSocketClientManager::create());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue