mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-18 08:20:44 +00:00
LibWeb: Implement the labels
attribute for all labelable elements
This returns a `NodeList` of all the labels associated with the given element.
This commit is contained in:
parent
3dc86747f0
commit
2447a25753
Notes:
sideshowbarker
2024-07-16 20:39:14 +09:00
Author: https://github.com/tcl3
Commit: 2447a25753
Pull-request: https://github.com/SerenityOS/serenity/pull/24359
11 changed files with 89 additions and 7 deletions
|
@ -68,6 +68,8 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/forms.html#category-label
|
||||
virtual bool is_labelable() const { return false; }
|
||||
|
||||
JS::GCPtr<DOM::NodeList> labels();
|
||||
|
||||
virtual Optional<ARIA::Role> default_role() const override;
|
||||
|
||||
String get_an_elements_target() const;
|
||||
|
@ -93,6 +95,8 @@ private:
|
|||
|
||||
JS::GCPtr<DOMStringMap> m_dataset;
|
||||
|
||||
JS::GCPtr<DOM::NodeList> m_labels;
|
||||
|
||||
enum class ContentEditableState {
|
||||
True,
|
||||
False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue