JSFiddle - React, Tailwind, and code Playground

by Bryan Forbes

HTML

<table id="table" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 0px;"><tbody><tr><td style="padding: 10px; border: 1px solid black;width: 200px;-webkit-box-sizing:content-box;">blah</td></tr></tbody></table>

<div>Is the above table's cell in content-box mode? <span id="output"></span></div>

JavaScript

dojo.ready(function(){
    var width = dojo.byId("table").firstChild
        .firstChild.firstChild
         .offsetWidth;
    dojo.byId("output").innerHTML =
        width == 200 ? "no" : "yes";
});