JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <body>
        <input id="cb" type="checkbox" />
    </body>
</html>

JavaScript

$(function() {
   
    $("#cb").attr("checked","checked");
    $("#cb").attr("data-whatever","checked");

    alert("Expecting this HTML fragment to have both a \"checked\" attribute and a \"data-whatever\" attribute:\n\n" + $("body").html());
    
});