diff options
author | Andreas Kling <kling@serenityos.org> | 2022-02-17 12:59:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-17 16:33:54 +0100 |
commit | 5f54b8dd6ca114e9b867958f0a64b7b190d47a74 (patch) | |
tree | 3e1e400af7342808684146d9ab06b207f88e6f34 /Userland/Libraries/LibWeb/DOM/Text.cpp | |
parent | 4cbce0e34cd3b197b85aea6c2286fa3838f6eab1 (diff) | |
download | serenity-5f54b8dd6ca114e9b867958f0a64b7b190d47a74.zip |
LibWeb: Fire "input" and "change" events when editing a text <input>
This isn't entirely on-spec, but will hopefully allow us to make
progress in other areas.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Text.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Text.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Text.cpp b/Userland/Libraries/LibWeb/DOM/Text.cpp index 47754603d4..9f50e29fd8 100644 --- a/Userland/Libraries/LibWeb/DOM/Text.cpp +++ b/Userland/Libraries/LibWeb/DOM/Text.cpp @@ -1,11 +1,12 @@ /* - * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ #include <LibWeb/DOM/Text.h> #include <LibWeb/DOM/Window.h> +#include <LibWeb/HTML/HTMLInputElement.h> #include <LibWeb/Layout/TextNode.h> namespace Web::DOM { @@ -25,4 +26,9 @@ NonnullRefPtr<Text> Text::create_with_global_object(Bindings::WindowObject& wind return make_ref_counted<Text>(window.impl().associated_document(), data); } +void Text::set_owner_input_element(Badge<HTML::HTMLInputElement>, HTML::HTMLInputElement& input_element) +{ + m_owner_input_element = input_element; +} + } |