diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-05-10 16:21:12 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-12 05:47:36 +0200 |
commit | 567b8da1e0a0df9b63e5e50897542cee0499ad95 (patch) | |
tree | 2e1a897ac68256f04fbee924b4f8f828d17bdbcd /Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp | |
parent | dff0e8a0dc56608a12081a6198b214b87812dfad (diff) | |
download | serenity-567b8da1e0a0df9b63e5e50897542cee0499ad95.zip |
LibWeb: Change the script fetch completion callback to accept any script
The completion callback currently only accepts a JavaScriptModuleScript.
The same callback will need to be used for ClassicScript scripts as well
so allow the callback to accept any Script type. The single existing
outside caller already stores the result as a Script.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index 45d310c7a3..64d0d11a2b 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -350,7 +350,7 @@ void HTMLScriptElement::prepare_script() else if (m_script_type == ScriptType::Module) { // Fetch an external module script graph given url, settings object, options, and onComplete. // FIXME: Pass options. - fetch_external_module_script_graph(url, settings_object, [this](auto* result) { + fetch_external_module_script_graph(url, settings_object, [this](auto result) { // 1. Mark as ready el given result. if (!result) mark_as_ready(ResultState::Null {}); @@ -382,7 +382,7 @@ void HTMLScriptElement::prepare_script() // 2. Fetch an inline module script graph, given source text, base URL, settings object, options, and with the following steps given result: // FIXME: Pass options - fetch_inline_module_script_graph(m_document->url().to_deprecated_string(), source_text, base_url, document().relevant_settings_object(), [this](auto* result) { + fetch_inline_module_script_graph(m_document->url().to_deprecated_string(), source_text, base_url, document().relevant_settings_object(), [this](auto result) { // 1. Mark as ready el given result. if (!result) mark_as_ready(ResultState::Null {}); |