mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Pass optional status code to ResourceLoader callbacks
This is needed for XMLHttpRequest, and will certainly be useful for other things, too.
This commit is contained in:
committed by
Andreas Kling
parent
975b209b9b
commit
000ef96613
Notes:
sideshowbarker
2024-07-18 20:52:01 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/000ef966134 Pull-request: https://github.com/SerenityOS/serenity/pull/6090
@@ -231,7 +231,7 @@ void HTMLScriptElement::prepare_script()
|
||||
m_script_filename = url.basename();
|
||||
ResourceLoader::the().load_sync(
|
||||
url,
|
||||
[this, url](auto data, auto&) {
|
||||
[this, url](auto data, auto&, auto) {
|
||||
if (data.is_null()) {
|
||||
dbgln("HTMLScriptElement: Failed to load {}", url);
|
||||
return;
|
||||
@@ -239,7 +239,7 @@ void HTMLScriptElement::prepare_script()
|
||||
m_script_source = String::copy(data);
|
||||
script_became_ready();
|
||||
},
|
||||
[this](auto&) {
|
||||
[this](auto&, auto) {
|
||||
m_failed_to_load = true;
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user