1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 21:08:12 +00:00

LibWeb: Add resource_directory_url for internal HTML pages

The error.html page now uses the resource_directory_url this
variable contains the relative path to /Base/res/ on the host
system as a file:// url. This is needed for future pages to load
resource files like icons. For the error.html page this was not
really needed because it lies over this own URL in FrameLoader.cpp.
This commit is contained in:
Bastiaan van der Plaat 2023-08-13 22:34:57 +02:00 committed by Sam Atkins
parent af01cf70eb
commit e4c3a52cfa
4 changed files with 26 additions and 1 deletions

View file

@ -98,6 +98,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Web::Platform::FontPlugin::install(*new Ladybird::FontPlugin(is_layout_test_mode));
Web::FrameLoader::set_resource_directory_url(DeprecatedString::formatted("file://{}/res", s_serenity_resource_root));
Web::FrameLoader::set_error_page_url(DeprecatedString::formatted("file://{}/res/html/error.html", s_serenity_resource_root));
TRY(Web::Bindings::initialize_main_thread_vm());