mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
LibWeb+LibJS: Remember source filenames when using HTML::Script
It's a lot easier to debug JavaScript problems if you can see which file the errors are in. :^)
This commit is contained in:
parent
6595db9ecf
commit
1484980f8f
Notes:
sideshowbarker
2024-07-18 04:18:47 +09:00
Author: https://github.com/awesomekling
Commit: 1484980f8f
7 changed files with 17 additions and 14 deletions
|
@ -303,7 +303,7 @@ void HTMLScriptElement::prepare_script()
|
|||
document().interpreter();
|
||||
|
||||
// FIXME: This is all ad-hoc and needs work.
|
||||
auto script = ClassicScript::create(data, *document().window().wrapper(), URL());
|
||||
auto script = ClassicScript::create(url.to_string(), data, *document().window().wrapper(), URL());
|
||||
|
||||
// When the chosen algorithm asynchronously completes, set the script's script to the result. At that time, the script is ready.
|
||||
m_script = script;
|
||||
|
@ -330,7 +330,7 @@ void HTMLScriptElement::prepare_script()
|
|||
document().interpreter();
|
||||
|
||||
// FIXME: Pass settings, base URL and options.
|
||||
auto script = ClassicScript::create(source_text, *document().window().wrapper(), URL());
|
||||
auto script = ClassicScript::create(m_document->url().to_string(), source_text, *document().window().wrapper(), URL());
|
||||
|
||||
// 2. Set the script's script to script.
|
||||
m_script = script;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue