see https export function matches ( element , selectors ) { if ( "matches" in element ) { return element . matches ( selectors ) ; } if ( "msMatchesSelector" in element ) { return ( element as any ) . msMatchesSelector ( selectors ) ; } return ( element as any ) . webkitMatchesSelector ( selectors ) ; }