mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:54:57 +00:00
LibWeb: Dispatch a "load" event on HTMLImageElement
This commit is contained in:
parent
57464be8f1
commit
1813e083ff
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <LibGfx/ImageDecoder.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/LayoutImage.h>
|
||||
#include <LibWeb/ResourceLoader.h>
|
||||
|
@ -64,7 +65,10 @@ void HTMLImageElement::load_image(const String& src)
|
|||
|
||||
m_encoded_data = data;
|
||||
m_image_decoder = Gfx::ImageDecoder::create(m_encoded_data.data(), m_encoded_data.size());
|
||||
|
||||
document().update_layout();
|
||||
|
||||
dispatch_event(Event::create("load"));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue