JSFiddle - React, Tailwind, and code Playground

by yijiang

JavaScript

var supported = {
    date: false,
    number: false,
    time: false,
    month: false,
    week: false
},
    tester = document.createElement('input'),
    output = '';

for (var i in supported) {
    tester.type = i;
    tester.value = ':(';

    if (tester.type === i && tester.value === '') {
        supported[i] = true;
    }

    output += '<p>' + i + ': ' + supported[i] + '</p>';
}

document.body.innerHTML = output;