mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
LibWeb: Implement input/textarea selection APIs
For both types of elements, `.selectionStart`, `.selectionEnd`, `.selectionDirection`, `.setSelectionRange()`, `.select()` and the `select` event are now implemented.
This commit is contained in:
committed by
Tim Flynn
parent
69bbeea4ef
commit
814ca3267e
@@ -2,6 +2,7 @@
|
||||
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2022, Adam Hodgen <ant1441@gmail.com>
|
||||
* Copyright (c) 2023, Bastiaan van der Plaat <bastiaan.v.d.plaat@gmail.com>
|
||||
* Copyright (c) 2024, Jelle Raaijmakers <jelle@gmta.nl>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@@ -137,9 +138,6 @@ public:
|
||||
WebIDL::ExceptionOr<bool> report_validity();
|
||||
void set_custom_validity(String const&);
|
||||
|
||||
WebIDL::ExceptionOr<void> select();
|
||||
WebIDL::ExceptionOr<void> set_selection_range(u32 start, u32 end, Optional<String> const& direction = {});
|
||||
|
||||
WebIDL::ExceptionOr<void> show_picker();
|
||||
|
||||
// ^DOM::EditableTextNodeOwner
|
||||
@@ -198,14 +196,9 @@ public:
|
||||
bool value_as_number_applies() const;
|
||||
bool step_applies() const;
|
||||
bool step_up_or_down_applies() const;
|
||||
bool select_applies() const;
|
||||
bool selection_or_range_applies() const;
|
||||
|
||||
WebIDL::ExceptionOr<void> set_selection_start_for_bindings(Optional<WebIDL::UnsignedLong> const&);
|
||||
Optional<WebIDL::UnsignedLong> selection_start_for_bindings() const;
|
||||
|
||||
WebIDL::ExceptionOr<void> set_selection_end_for_bindings(Optional<WebIDL::UnsignedLong> const&);
|
||||
Optional<WebIDL::UnsignedLong> selection_end_for_bindings() const;
|
||||
|
||||
private:
|
||||
HTMLInputElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user