mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 08:48:49 +00:00
LibWeb: Add hack to dispatch load event for <object>s
This increases our Acid3 score to 81/100 on the live website, and fixes the 5 second spin locally.
This commit is contained in:
parent
b1096c2ae4
commit
5d2b741ec9
Notes:
sideshowbarker
2024-07-17 17:20:23 +09:00
Author: https://github.com/sin-ack
Commit: 5d2b741ec9
Pull-request: https://github.com/SerenityOS/serenity/pull/13065
1 changed files with 4 additions and 0 deletions
|
@ -21,11 +21,15 @@ HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName
|
|||
m_image_loader.on_load = [this] {
|
||||
m_should_show_fallback_content = false;
|
||||
set_needs_style_update(true);
|
||||
// FIXME: This should be done by the HTML^Wdocument parser.
|
||||
dispatch_event(DOM::Event::create(HTML::EventNames::load));
|
||||
};
|
||||
|
||||
m_image_loader.on_fail = [this] {
|
||||
m_should_show_fallback_content = true;
|
||||
set_needs_style_update(true);
|
||||
// FIXME: This should be done by the HTML^Wdocument parser.
|
||||
dispatch_event(DOM::Event::create(HTML::EventNames::load));
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue