summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2020-11-21 19:15:57 +0000
committerAndreas Kling <kling@serenityos.org>2020-11-22 18:20:56 +0100
commit99502708087031172bca0e0dc423b28d82517ea8 (patch)
tree3c7d4b5050d8f7c2987474689f6f713c0a4b311c /Libraries/LibWeb/HTML/HTMLScriptElement.cpp
parente68348298f1f0905d6014c8bd5f6da2a3b6233d8 (diff)
downloadserenity-99502708087031172bca0e0dc423b28d82517ea8.zip
LibWeb: Add HTML::EventNames and UIEvents::EventNames
Diffstat (limited to 'Libraries/LibWeb/HTML/HTMLScriptElement.cpp')
-rw-r--r--Libraries/LibWeb/HTML/HTMLScriptElement.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
index 524d9d742c..a71ecd9fbd 100644
--- a/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
+++ b/Libraries/LibWeb/HTML/HTMLScriptElement.cpp
@@ -29,6 +29,7 @@
#include <LibWeb/DOM/Document.h>
#include <LibWeb/DOM/Event.h>
#include <LibWeb/DOM/Text.h>
+#include <LibWeb/HTML/EventNames.h>
#include <LibWeb/HTML/HTMLScriptElement.h>
#include <LibWeb/Loader/ResourceLoader.h>
@@ -58,7 +59,7 @@ void HTMLScriptElement::execute_script()
document().run_javascript(m_script_source);
if (has_attribute(HTML::AttributeNames::src))
- dispatch_event(DOM::Event::create("load"));
+ dispatch_event(DOM::Event::create(EventNames::load));
}
void HTMLScriptElement::prepare_script(Badge<HTMLDocumentParser>)