mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Take namespace into account when matching attribute
This commit is contained in:
parent
033cd9cab3
commit
d743fcb376
Notes:
github-actions[bot]
2024-11-30 16:48:12 +00:00
Author: https://github.com/netanel-haber 🔰
Commit: d743fcb376
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2613
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 77 additions and 3 deletions
|
@ -194,6 +194,16 @@ Attr const* NamedNodeMap::get_attribute_ns(Optional<FlyString> const& namespace_
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
Attr const* NamedNodeMap::get_attribute_namespace_agnostic(FlyString const& local_name) const
|
||||
{
|
||||
for (auto const& attribute : m_attributes) {
|
||||
if (attribute->local_name() == local_name)
|
||||
return attribute.ptr();
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-element-attributes-set
|
||||
WebIDL::ExceptionOr<GC::Ptr<Attr>> NamedNodeMap::set_attribute(Attr& attribute)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue