1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +00:00

LibWeb: Add a partial implementation of Element.setAttributeNS()

This implementation does some of the required validation and then passes
through the localName and value to Element.setAttribute().
This commit is contained in:
Andreas Kling 2022-02-05 18:21:49 +01:00
parent 2518f2045e
commit e2c71b6725
3 changed files with 59 additions and 0 deletions

View file

@ -54,6 +54,7 @@ public:
String attribute(const FlyString& name) const { return get_attribute(name); }
String get_attribute(const FlyString& name) const;
ExceptionOr<void> set_attribute(const FlyString& name, const String& value);
ExceptionOr<void> set_attribute_ns(FlyString const& namespace_, FlyString const& qualified_name, String const& value);
void remove_attribute(const FlyString& name);
size_t attribute_list_size() const { return m_attributes->length(); }
NonnullRefPtr<NamedNodeMap> const& attributes() const { return m_attributes; }