JSFiddle - React, Tailwind, and code Playground
JavaScript
var body = $$('body')[0];
var test = new Element('div', {'style':'visibility:hidden; width: 100px; height: 100px; overflow: scroll;'});
test.inject(body);
var scrollbar = {
width: test.offsetWidth - test.scrollWidth
, height: test.offsetHeight - test.scrollHeight
}
test.set('text', [test.offsetWidth, test.scrollWidth, scrollbar.width, scrollbar.height].join(',') );
test.setStyle('visibility', '');