mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibWeb: Use the script's own URL as filename for fetched classic script
This makes JS backtraces actually show the filename of scripts correctly again (instead of the URL of the document that loaded them).
This commit is contained in:
parent
18c735429f
commit
854b114c04
Notes:
sideshowbarker
2024-07-17 14:33:07 +09:00
Author: https://github.com/awesomekling
Commit: 854b114c04
Pull-request: https://github.com/SerenityOS/serenity/pull/19703
1 changed files with 2 additions and 1 deletions
|
@ -288,7 +288,8 @@ WebIDL::ExceptionOr<void> fetch_classic_script(JS::NonnullGCPtr<HTMLScriptElemen
|
|||
// 7. Let script be the result of creating a classic script given source text, settings object, response's URL,
|
||||
// options, and muted errors.
|
||||
// FIXME: Pass options.
|
||||
auto script = ClassicScript::create(element->document().url().to_deprecated_string(), source_text, settings_object, response->url().value_or({}), 1, muted_errors);
|
||||
auto response_url = response->url().value_or({});
|
||||
auto script = ClassicScript::create(response_url.to_deprecated_string(), source_text, settings_object, response_url, 1, muted_errors);
|
||||
|
||||
// 8. Run onComplete given script.
|
||||
on_complete(script);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue