LibWeb: Implement the HTMLFormElement.relList attribute

This returns a DOMTokenList that reflects the `rel` attribute.
This commit is contained in:
Tim Ledbetter
2024-05-16 06:02:56 +01:00
committed by Andreas Kling
parent 0a3e1846f0
commit fc4e0cf10e
5 changed files with 33 additions and 1 deletions

View File

@@ -92,6 +92,8 @@ public:
StringView method() const;
WebIDL::ExceptionOr<void> set_method(String const&);
JS::GCPtr<DOM::DOMTokenList> rel_list();
String action() const;
WebIDL::ExceptionOr<void> set_action(String const&);
@@ -109,6 +111,8 @@ private:
virtual Vector<FlyString> supported_property_names() const override;
virtual bool is_supported_property_index(u32) const override;
virtual void attribute_changed(FlyString const& name, Optional<String> const& value) override;
ErrorOr<String> pick_an_encoding() const;
ErrorOr<void> mutate_action_url(URL::URL parsed_action, Vector<XHR::FormDataEntry> entry_list, String encoding, JS::NonnullGCPtr<Navigable> target_navigable, Bindings::NavigationHistoryBehavior history_handling, UserNavigationInvolvement user_involvement);
@@ -143,6 +147,8 @@ private:
// Each form element has a planned navigation, which is either null or a task; when the form is first created,
// its planned navigation must be set to null.
JS::GCPtr<Task const> m_planned_navigation;
JS::GCPtr<DOM::DOMTokenList> m_rel_list;
};
}