mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Implement selectionchange event according to spec
This commit is contained in:
parent
aab5a9e944
commit
a58f39c9e2
Notes:
github-actions[bot]
2024-10-09 17:09:45 +00:00
Author: https://github.com/gmta
Commit: a58f39c9e2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1696
Reviewed-by: https://github.com/tcl3
4 changed files with 82 additions and 14 deletions
|
@ -162,6 +162,10 @@ public:
|
|||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-textarea/input-setselectionrange
|
||||
WebIDL::ExceptionOr<void> set_selection_range(Optional<WebIDL::UnsignedLong> start, Optional<WebIDL::UnsignedLong> end, Optional<String> direction);
|
||||
|
||||
// https://w3c.github.io/selection-api/#dfn-has-scheduled-selectionchange-event
|
||||
bool has_scheduled_selectionchange_event() const { return m_has_scheduled_selectionchange_event; }
|
||||
void set_scheduled_selectionchange_event(bool value) { m_has_scheduled_selectionchange_event = value; }
|
||||
|
||||
protected:
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-textarea/input-relevant-value
|
||||
void relevant_value_was_changed(JS::GCPtr<DOM::Text>);
|
||||
|
@ -173,6 +177,9 @@ private:
|
|||
WebIDL::UnsignedLong m_selection_start { 0 };
|
||||
WebIDL::UnsignedLong m_selection_end { 0 };
|
||||
SelectionDirection m_selection_direction { SelectionDirection::None };
|
||||
|
||||
// https://w3c.github.io/selection-api/#dfn-has-scheduled-selectionchange-event
|
||||
bool m_has_scheduled_selectionchange_event { false };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue