mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 06:09:08 +00:00
LibWeb: Recreate the <input> shadow tree when the type attribute changes
This is often used on login forms, for example, to toggle the visibility of a password. The site will change the <input> element's type to "text" to allow the password to show.
This commit is contained in:
parent
06a3ca734e
commit
0e774fe780
Notes:
sideshowbarker
2024-07-17 01:46:43 +09:00
Author: https://github.com/trflynn89
Commit: 0e774fe780
Pull-request: https://github.com/SerenityOS/serenity/pull/23838
6 changed files with 67 additions and 1 deletions
7
Tests/LibWeb/Layout/input/input-password-to-text.html
Normal file
7
Tests/LibWeb/Layout/input/input-password-to-text.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<input type="password" value="hunter2" />
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let input = document.querySelector("input");
|
||||
input.type = "text";
|
||||
});
|
||||
</script>
|
7
Tests/LibWeb/Layout/input/input-text-to-password.html
Normal file
7
Tests/LibWeb/Layout/input/input-text-to-password.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<input type="text" value="hunter2" />
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let input = document.querySelector("input");
|
||||
input.type = "password";
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue