v151 · security · feature detection
Algorithm Support Probe
The update adds a static, synchronous SubtleCrypto.supports(operation, algorithm) method. Before this, the only way to feature-detect an algorithm was to actually attempt an operation and catch the rejection — asynchronous and wasteful. Now you can branch instantly. This tool calls the real method live and builds a support matrix from what your browser reports.
SubtleCrypto.supports is not exposed in this browser. Chromium implements it with the modern-WebCrypto algorithms behind the WebCryptoPQC runtime feature. To test it:
- Quit Chrome, then relaunch with
--enable-blink-features=WebCryptoPQC(in a Chrome/Canary build containing the experimental implementation), or - Join the
WebCryptoAdditionalAlgorithms202606origin trial.
checking for SubtleCrypto.supports…
full support matrix
| algorithm \ operation |
|---|
the code
// Static and synchronous — no promise, no try/catch needed
if (globalThis.SubtleCrypto?.supports?.("encapsulateBits", "ML-KEM-768")) {
// use post-quantum key encapsulation
} else {
// fall back to ECDH
}
// Choose the best available password KDF up front
const kdf = globalThis.SubtleCrypto?.supports?.("importKey", "Argon2id") ? "Argon2id" : "PBKDF2";
supports is defined as a static method on the SubtleCrypto interface object, so you call it there, not on the crypto.subtle instance. Accessing the constructor through globalThis.SubtleCrypto?. matters: optional chaining directly from an undeclared SubtleCrypto identifier can still throw a ReferenceError in browsers without that global.