mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibWeb: Add HTML::EventNames and UIEvents::EventNames
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/HTML/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/ImageBox.h>
|
||||
#include <LibWeb/Loader/ResourceLoader.h>
|
||||
@@ -41,13 +42,13 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, const QualifiedName&
|
||||
{
|
||||
m_image_loader.on_load = [this] {
|
||||
this->document().update_layout();
|
||||
dispatch_event(DOM::Event::create("load"));
|
||||
dispatch_event(DOM::Event::create(EventNames::load));
|
||||
};
|
||||
|
||||
m_image_loader.on_fail = [this] {
|
||||
dbg() << "HTMLImageElement: Resource did fail: " << this->src();
|
||||
this->document().update_layout();
|
||||
dispatch_event(DOM::Event::create("error"));
|
||||
dispatch_event(DOM::Event::create(EventNames::error));
|
||||
};
|
||||
|
||||
m_image_loader.on_animate = [this] {
|
||||
|
||||
Reference in New Issue
Block a user