JSFiddle - React, Tailwind, and code Playground
HTML
<h3 foo="bar">generated content</h3>
CSS
h3:after {
content: ' rocks!' attr(foo);
}
JavaScript
var h3 = document.querySelector('h3'),
result = getComputedStyle(h3, ':after').content;
console.log('the generated content is: ', result); // returns ' rocks!'