mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:37:35 +00:00
LibWeb: Don't include DOM/Attr.h from DOM/Element.h
This required moving Element::for_each_attribute() out of line, but that seems harmless enough.
This commit is contained in:
parent
43616316de
commit
5b5fbecb38
5 changed files with 13 additions and 9 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <LibWeb/CSS/ResolvedCSSStyleDeclaration.h>
|
||||
#include <LibWeb/CSS/SelectorEngine.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/DOM/Attr.h>
|
||||
#include <LibWeb/DOM/DOMTokenList.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Element.h>
|
||||
|
@ -1673,4 +1674,12 @@ void Element::set_prefix(DeprecatedFlyString const& value)
|
|||
m_qualified_name.set_prefix(value);
|
||||
}
|
||||
|
||||
void Element::for_each_attribute(Function<void(DeprecatedFlyString const&, DeprecatedString const&)> callback) const
|
||||
{
|
||||
for (size_t i = 0; i < m_attributes->length(); ++i) {
|
||||
auto const* attribute = m_attributes->item(i);
|
||||
callback(attribute->name(), attribute->value());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue