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