mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibWeb: Allow all Script types to be used as [[HostDefined]] values
This patch adds support for all child classes of Web::HTML::Script to be used in the [[HostDefined]] field of JS::Modules and JS::Scripts.
This commit is contained in:
parent
5a3e079deb
commit
83554526f0
4 changed files with 12 additions and 10 deletions
|
@ -13,9 +13,7 @@
|
|||
namespace Web::HTML {
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#classic-script
|
||||
class ClassicScript final
|
||||
: public Script
|
||||
, public JS::Script::HostDefined {
|
||||
class ClassicScript final : public Script {
|
||||
JS_CELL(ClassicScript, Script);
|
||||
|
||||
public:
|
||||
|
@ -42,7 +40,6 @@ private:
|
|||
ClassicScript(AK::URL base_url, String filename, EnvironmentSettingsObject& environment_settings_object);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
virtual void visit_host_defined_self(Cell::Visitor&) override;
|
||||
|
||||
JS::GCPtr<JS::Script> m_script_record;
|
||||
MutedErrors m_muted_errors { MutedErrors::No };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue