mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:37:35 +00:00
LibWeb: Define getting and setting an attribute value
This commit is contained in:
parent
2c096486a4
commit
720f7ba746
2 changed files with 41 additions and 0 deletions
|
@ -90,12 +90,17 @@ public:
|
|||
bool has_attribute(DeprecatedFlyString const& name) const;
|
||||
bool has_attribute_ns(DeprecatedFlyString namespace_, DeprecatedFlyString const& name) const;
|
||||
bool has_attributes() const;
|
||||
|
||||
DeprecatedString attribute(DeprecatedFlyString const& name) const { return get_attribute(name); }
|
||||
DeprecatedString get_attribute(DeprecatedFlyString const& name) const;
|
||||
DeprecatedString get_attribute_value(DeprecatedFlyString const& local_name, DeprecatedFlyString const& namespace_ = {}) const;
|
||||
|
||||
virtual WebIDL::ExceptionOr<void> set_attribute(DeprecatedFlyString const& name, DeprecatedString const& value);
|
||||
WebIDL::ExceptionOr<void> set_attribute_ns(DeprecatedFlyString const& namespace_, DeprecatedFlyString const& qualified_name, DeprecatedString const& value);
|
||||
void set_attribute_value(DeprecatedFlyString const& local_name, DeprecatedString const& value, DeprecatedFlyString const& prefix = {}, DeprecatedFlyString const& namespace_ = {});
|
||||
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node(Attr&);
|
||||
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node_ns(Attr&);
|
||||
|
||||
virtual void remove_attribute(DeprecatedFlyString const& name);
|
||||
WebIDL::ExceptionOr<bool> toggle_attribute(DeprecatedFlyString const& name, Optional<bool> force);
|
||||
size_t attribute_list_size() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue