JSFiddle - React, Tailwind, and code Playground

by rodneyrehm

HTML

<button id="run">test</button>

JavaScript

function log (m) {
    $('<p></p>').text(m).appendTo(document.body);
}


(function(window, document){
    var testZoomFactor = function() {
        var p = document.createElement("p");
        
        p.style.cssText = "position: absolute; top: -10em; visibility:hidden; font: normal 10px arial;"
        
        p.textContent = "Hello World";
        document.body.appendChild(p);
        
        log(window.getComputedStyle
            ? window.getComputedStyle(p,null).getPropertyValue("height")
            : "unknown");
        log(p.offsetHeight);
        
        
        p.parentNode.removeChild(p);
    };
    
    $('#run').on('click', testZoomFactor);
})(window, document);