license /** Cached result Set of input types support by the current browser. */ let supportedInputTypes ; /** Types of `<input>` that *might* be supported. */ const candidateInputTypes = [ 'color' , 'button' , 'checkbox' , 'date' , 'datetime-local' , 'email' , 'file' , 'hidden' , 'image' , 'month' , 'number' , 'password' , 'radio' , 'range' , 'reset' , 'search' , 'submit' , 'tel' , 'text' , 'time' , 'url' , 'week' , ] ; returns export function getSupportedInputTypes ( ) { if ( supportedInputTypes ) { return supportedInputTypes ; } if ( typeof document !== 'object' || ! document ) { supportedInputTypes = new Set ( candidateInputTypes ) ; return supportedInputTypes ; } let featureTestInput = document . createElement ( 'input' ) ; supportedInputTypes = new Set ( candidateInputTypes . filter ( value => { featureTestInput . setAttribute ( 'type' , value ) ; return featureTestInput . type === value ; } ) ) ; return supportedInputTypes ; }