1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

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.
This commit is contained in:
Andreas Kling 2022-02-17 12:59:32 +01:00
parent 4cbce0e34c
commit 5f54b8dd6c
5 changed files with 39 additions and 1 deletions

View file

@ -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;
}
}