Baseline Widely available
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.
token
A string containing the token to query for.
A boolean value indicating whether the token was found.
Exampleconst iframe = document.getElementById("display");
if (iframe.sandbox.supports("an-upcoming-feature")) {
// support code for mystery future feature
} else {
// fallback code
}
if (iframe.sandbox.supports("allow-scripts")) {
// instruct frame to run JavaScript
//
// (NOTE: This feature is well-supported; this is just an example!)
//
}
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3