mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Sam Atkins
parent
af01cf70eb
commit
e4c3a52cfa
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user