serenity/Tests/LibWeb/Layout/input/input-password-to-text.html
Timothy Flynn 0e774fe780 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.
2024-04-04 21:06:45 +02:00

8 lines
232 B
HTML

<input type="password" value="hunter2" />
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
let input = document.querySelector("input");
input.type = "text";
});
</script>