supports

fun supports(token: T): Boolean(source)

The supports() method of the DOMTokenList interface returns true if a given token is in the associated attribute's supported tokens. This method is intended to support feature detection.

MDN Reference