mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Expose NamedNodeMap::append_attribute in Element
This commit is contained in:
parent
907be5a96e
commit
19ca6f68ba
Notes:
sideshowbarker
2024-07-17 11:29:41 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/19ca6f68ba Pull-request: https://github.com/SerenityOS/serenity/pull/21227 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/kemzeb
2 changed files with 8 additions and 0 deletions
|
@ -270,6 +270,12 @@ WebIDL::ExceptionOr<void> Element::set_attribute_ns(Optional<String> const& name
|
|||
return {};
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-element-attributes-append
|
||||
void Element::append_attribute(Attr& attribute)
|
||||
{
|
||||
m_attributes->append_attribute(attribute);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-element-attributes-set-value
|
||||
void Element::set_attribute_value(FlyString const& local_name, DeprecatedString const& value, Optional<FlyString> const& prefix, DeprecatedFlyString const& namespace_)
|
||||
{
|
||||
|
|
|
@ -122,6 +122,8 @@ public:
|
|||
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node(Attr&);
|
||||
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node_ns(Attr&);
|
||||
|
||||
void append_attribute(Attr&);
|
||||
|
||||
// FIXME: This should take a 'FlyString cosnt&'
|
||||
void remove_attribute(StringView name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue