JSFiddle - React, Tailwind, and code Playground

HTML

<input></input>

CSS

input {
    text-security:disc;
    -webkit-text-security:disc;
    -mox-text-security:disc;
}

JavaScript

window.onload = function(){
            init(); 
        }
        function init(){
            var x = document.getElementsByTagName("input")[0];
            var style = window.getComputedStyle(x);
            console.log(style);
            if(style.webkitTextSecurity){
                //do nothing
            }else{
                x.setAttribute("type","password");
            }
        }