3 ms·
Every browser that supports generators is self/auto updating to a version that supports async. (Except maybe Safari)... in any case, that's where I decided to d
by tracker1 8y ago
Every browser that supports generators is self/auto updating to a version that supports async. (Except maybe Safari)... in any case, that's where I decided to draw the line.
If it supports async, it stays on modern.html, otherwise it redirects to legacy.html. There's also the ability to do some server detection for what payload to deliver. It's just async support is the only feature I test for.
client test;
try {
eval('(function() { async _ => _; })();');
} catch (e) {
window.location.replace('/legacy.html');
}
server test:
import * as capabilities from 'browser-capabilities';
export default userAgent =>
capabilities
.browserCapabilities(userAgent)
.has('es2017');