Skip to content

Commit

Permalink
LibWeb: Remove incorrect call to is_html_element()
Browse files Browse the repository at this point in the history
This is because the HTML spec defines an HTML element by its
namespace, not by the fact that it inherits from HTMLElement.
  • Loading branch information
Psychpsyo committed Jan 9, 2025
1 parent 482e5de commit 920e351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/LibWeb/DOM/Element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3190,7 +3190,7 @@ Optional<String> Element::lang() const

// 2. If the node is an HTML element or an element in the SVG namespace, and it has a lang in no namespace attribute set
// Use the value of that attribute.
if (is_html_element() || namespace_uri() == Namespace::SVG) {
if (namespace_uri() == Namespace::HTML || namespace_uri() == Namespace::SVG) {
auto maybe_lang = get_attribute(HTML::AttributeNames::lang);
if (maybe_lang.has_value())
return maybe_lang.release_value();
Expand Down

0 comments on commit 920e351

Please sign in to comment.