1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

LibWeb: Rename HTMLScriptElement::m_script_source => m_source_text

This commit is contained in:
Andreas Kling 2021-09-09 18:11:33 +02:00
parent e1fb8bef09
commit bc12921d43
2 changed files with 5 additions and 5 deletions

View file

@ -45,7 +45,7 @@ void HTMLScriptElement::execute_script()
return; return;
} }
if (m_script_source.is_null()) { if (m_source_text.is_null()) {
dbgln("HTMLScriptElement: Refusing to run script because the script source is null."); dbgln("HTMLScriptElement: Refusing to run script because the script source is null.");
dispatch_event(DOM::Event::create(HTML::EventNames::error)); dispatch_event(DOM::Event::create(HTML::EventNames::error));
return; return;
@ -70,7 +70,7 @@ void HTMLScriptElement::execute_script()
else else
dbgln_if(HTML_SCRIPT_DEBUG, "HTMLScriptElement: Running inline script"); dbgln_if(HTML_SCRIPT_DEBUG, "HTMLScriptElement: Running inline script");
document().run_javascript(m_script_source, m_script_filename); document().run_javascript(m_source_text, m_script_filename);
document().set_current_script({}, old_current_script); document().set_current_script({}, old_current_script);
} else { } else {
@ -280,7 +280,7 @@ void HTMLScriptElement::prepare_script()
dbgln("HTMLScriptElement: Failed to load {}", url); dbgln("HTMLScriptElement: Failed to load {}", url);
return; return;
} }
m_script_source = String::copy(data); m_source_text = String::copy(data);
script_became_ready(); script_became_ready();
}, },
[this](auto&, auto) { [this](auto&, auto) {
@ -300,7 +300,7 @@ void HTMLScriptElement::prepare_script()
// -> "classic" // -> "classic"
// FIXME: 1. Let script be the result of creating a classic script using source text, settings object, base URL, and options. // FIXME: 1. Let script be the result of creating a classic script using source text, settings object, base URL, and options.
// FIXME: 2. Set the script's script to script. // FIXME: 2. Set the script's script to script.
m_script_source = source_text; m_source_text = source_text;
// 3. The script is ready. // 3. The script is ready.
script_became_ready(); script_became_ready();

View file

@ -61,7 +61,7 @@ private:
Function<void()> m_script_ready_callback; Function<void()> m_script_ready_callback;
String m_script_source; String m_source_text;
String m_script_filename; String m_script_filename;
}; };