mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 01:08:48 +00:00
LibWeb: Hide implementation details of HTMLToken attribute list
Previously, HTMLToken would expose the Vector<Attribute> directly to its users. In preparation for a future change, all users now use implementation-agnostic APIs which do not expose the Vector directly.
This commit is contained in:
parent
15d8635afc
commit
918bde98b1
Notes:
sideshowbarker
2024-07-18 08:52:54 +09:00
Author: https://github.com/MaxWipfli
Commit: 918bde98b1
Pull-request: https://github.com/SerenityOS/serenity/pull/8784
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/alimpfard
6 changed files with 108 additions and 59 deletions
|
@ -42,12 +42,13 @@ String HTMLToken::to_string() const
|
|||
builder.append(" { name: '");
|
||||
builder.append(tag_name());
|
||||
builder.append("', { ");
|
||||
for (auto& attribute : m_tag.attributes) {
|
||||
for_each_attribute([&](auto& attribute) {
|
||||
builder.append(attribute.local_name);
|
||||
builder.append("=\"");
|
||||
builder.append(attribute.value);
|
||||
builder.append("\" ");
|
||||
}
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
builder.append("} }");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue