JSFiddle - React, Tailwind, and code Playground

JavaScript

// Create the element
var element = document.createElement( "input" );

// Give it the number property and invalid contents
element.type = "number";
element.value = "qwerty";

// If the string isn't empty, we have a problem
alert( element.value ? "Not Supported" : "Supported" );