mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibWeb: Make HTMLScriptElement create and run ClassicScripts
Before this patch, HTMLScriptElement would cache the full script source
text in a String member, and parse that just-in-time via Document's
run_javascript() helpers.
We now follow the spec more closely and turn the incoming source text
into a ClassicScript object ("the script's script" in the spec.)
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 04:22:02 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1864b2b8285
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <AK/Function.h>
|
||||
#include <LibWeb/HTML/HTMLElement.h>
|
||||
#include <LibWeb/HTML/Scripting/Script.h>
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
@@ -61,8 +62,9 @@ private:
|
||||
|
||||
Function<void()> m_script_ready_callback;
|
||||
|
||||
String m_source_text;
|
||||
String m_script_filename;
|
||||
|
||||
RefPtr<Script> m_script;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user