JSFiddle - React, Tailwind, and code Playground

HTML

<input type="password" id="host" value="XXXX">

JavaScript

var host = document.getElementById("host");
var shadow = new WebKitShadowRoot(host);
shadow.innerHTML = "<div style='display: -webkit-box; -webkit-box-align: center; '><shadow></shadow><div style='background-color: blue; color: white; display:block'>x</div></div>";