mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibWeb: Implement more steps in 'fetching a single module script'
By using fetch, the request now also follows redirects, which in the end makes the 'Polyfilled Features' section on https://github.github.com/browser-support/ load :^)
This commit is contained in:
parent
6354f950fd
commit
7fa5dd7a92
Notes:
sideshowbarker
2024-07-17 05:01:20 +09:00
Author: https://github.com/krkk
Commit: 7fa5dd7a92
Pull-request: https://github.com/SerenityOS/serenity/pull/20448
Reviewed-by: https://github.com/trflynn89
3 changed files with 110 additions and 63 deletions
|
@ -397,8 +397,7 @@ void HTMLScriptElement::prepare_script()
|
|||
// -> "module"
|
||||
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, move(on_complete));
|
||||
fetch_external_module_script_graph(realm(), url, settings_object, options, move(on_complete));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -424,7 +423,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(realm(), 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 {});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue