mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 08:18:49 +00:00
LibWeb: Fix <body> and <img> elements not parsing their class attribute
Subclasses that override Element::parse_attribute() must always call to base class since otherwise we might forget to parse some attributes. This makes class selectors work on <body> and <img> elements. :^)
This commit is contained in:
parent
5be613c9c8
commit
ec1891837f
Notes:
sideshowbarker
2024-07-19 05:50:16 +09:00
Author: https://github.com/awesomekling
Commit: ec1891837f
2 changed files with 2 additions and 0 deletions
|
@ -48,6 +48,7 @@ HTMLImageElement::~HTMLImageElement()
|
|||
|
||||
void HTMLImageElement::parse_attribute(const FlyString& name, const String& value)
|
||||
{
|
||||
HTMLElement::parse_attribute(name, value);
|
||||
if (name.equals_ignoring_case("src"))
|
||||
load_image(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue