JSFiddle - React, Tailwind, and code Playground

HTML

<div id="test">This text should not be visible!</div>

CSS

#test {
    color: black;
    background-color: red;
    width: 300px;
    height: 50px;
}

JavaScript

var p = document.createElement('p');
document.body.appendChild(p);
p.style.widows = 0;
if (getComputedStyle(p).widows !== 'auto') {
    document.querySelector('#test').style.backgroundColor = 'black';
}