-webkit-text security

I installed text-security:disc; as follows, but it does not work in firefox.

 text-security:disc; -webkit-text-security:disc; -mox-text-security:disc; 

I set these properties in the input[type='number'] field. Any suggestion?

+5
source share
1 answer
 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"); } } 

CSS

 input { text-security: disc; -webkit-text-security: disc; -moz-text-security: disc; } 
+4
source

Source: https://habr.com/ru/post/1202485/


All Articles