mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 01:12:56 +00:00
LibWeb: Port AttributeNames to FlyString
This commit is contained in:
parent
6a3f27509f
commit
e4f8c59210
Notes:
sideshowbarker
2024-07-18 04:46:35 +09:00
Author: https://github.com/shannonbooth
Commit: e4f8c59210
Pull-request: https://github.com/SerenityOS/serenity/pull/21376
93 changed files with 148 additions and 149 deletions
|
@ -48,10 +48,10 @@ Vector<DOMStringMap::NameValuePair> DOMStringMap::get_name_value_pairs() const
|
|||
// in the order that those attributes are listed in the element's attribute list, add a name-value pair to list whose name is the attribute's name with the first five characters removed and whose value
|
||||
// is the attribute's value.
|
||||
m_associated_element->for_each_attribute([&](auto& name, auto& value) {
|
||||
if (!name.starts_with("data-"sv))
|
||||
if (!name.bytes_as_string_view().starts_with("data-"sv))
|
||||
return;
|
||||
|
||||
auto name_after_starting_data = name.view().substring_view(5);
|
||||
auto name_after_starting_data = name.bytes_as_string_view().substring_view(5);
|
||||
|
||||
for (auto character : name_after_starting_data) {
|
||||
if (is_ascii_upper_alpha(character))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue