JSFiddle - React, Tailwind, and code Playground

by Brian Blakely

HTML

<input id="foo" type="text" placeholder="I already know that" />

JavaScript

var input = document.getElementById('foo');
if('placeholder' in input) {
    input.setAttribute('placeholder',"Yeah, it's supported");
} else {
    // Something something...
}