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:
parent
af01cf70eb
commit
e4c3a52cfa
4 changed files with 26 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue