diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp index 3c8316930b..ba0c9a1c15 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.cpp @@ -837,4 +837,11 @@ i32 HTMLInputElement::default_tab_index_value() const return 0; } +// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-textarea/input-setselectionrange +WebIDL::ExceptionOr HTMLInputElement::set_selection_range(u32 start, u32 end, DeprecatedString const& direction) +{ + dbgln("(STUBBED) HTMLInputElement::set_selection_range(start={}, end={}, direction='{}'). Called on: {}", start, end, direction, debug_description()); + return {}; +} + } diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h index d6027e39f4..7ee434f7b8 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.h @@ -87,6 +87,8 @@ public: // https://html.spec.whatwg.org/multipage/input.html#update-the-file-selection void update_the_file_selection(JS::NonnullGCPtr); + WebIDL::ExceptionOr set_selection_range(u32 start, u32 end, DeprecatedString const& direction); + WebIDL::ExceptionOr show_picker(); // ^EventTarget diff --git a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.idl index 2db4de4496..def33de5af 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLInputElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLInputElement.idl @@ -38,6 +38,8 @@ interface HTMLInputElement : HTMLElement { [Reflect] attribute DOMString align; [Reflect=usemap] attribute DOMString useMap; + undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); + undefined showPicker(); };