Supporting feature tests directly

Tab Atkins Jr. jackalmage at
Wed Mar 25 18:44:53 UTC 2015

On Sun, Mar 22, 2015 at 3:59 AM, Andrea Giammarchi
<andrea.giammarchi at> wrote:
> +1 to Kyle proposal, using eval or Function is not even an option in CSP
> constrained environments ( unless the relative code is provided as SHA256,
> then we need to agree on how such code should look like and share it as
> polyfill )
> I'd also suggest `Reflect.isValidSyntax` as alternative to
> `Reflect.supports` 'cause it's less misleading when it comes to figure out
> APIs support and their implementation.
> After all, that's exactly what we'd like to know, if a generic syntax will
> break or not.

CSS has an exactly analogous feature already, and calls it
CSS.supports().  That's a decent reason to stick with supports() as
the name.


More information about the es-discuss mailing list