summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h
index 9ba65c259c..827fbcc5dc 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.h
@@ -32,6 +32,12 @@ public:
virtual void inserted() override;
+ // https://html.spec.whatwg.org/multipage/scripting.html#dom-script-supports
+ static bool supports(String const& type)
+ {
+ return type.is_one_of("classic", "module");
+ }
+
private:
void prepare_script();
void script_became_ready();