mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +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:
parent
975b209b9b
commit
000ef96613
Notes:
sideshowbarker
2024-07-18 20:52:01 +09:00
Author: https://github.com/linusg
Commit: 000ef96613
Pull-request: https://github.com/SerenityOS/serenity/pull/6090
8 changed files with 42 additions and 39 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue