mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb: Implement dispatching of "input" event
This commit is contained in:
parent
d88e6bee5d
commit
0de61b0f65
Notes:
github-actions[bot]
2024-10-22 12:46:02 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: 0de61b0f65
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1903
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/trflynn89 ✅
11 changed files with 139 additions and 3 deletions
19
Tests/LibWeb/Text/input/Editing/input-event.html
Normal file
19
Tests/LibWeb/Text/input/Editing/input-event.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<script src="../include.js"></script>
|
||||
<style>
|
||||
#input {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<div id="input" contenteditable="true"></div>
|
||||
<script>
|
||||
test(() => {
|
||||
const input = document.getElementById("input");
|
||||
input.addEventListener("input", (e) => {
|
||||
println(`input data=(${e.data}) intputType=(${e.inputType})`);
|
||||
});
|
||||
internals.sendText(input, "hello");
|
||||
internals.commitText();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue