mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00: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
@@ -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