Supporting feature tests directly

Andrea Giammarchi andrea.giammarchi at gmail.com
Wed Mar 25 19:06:52 UTC 2015


For consistency sake I agree, but I come from a world where browsers also
exposed unofficially APIs so that, as James mentioned already, `
Array.prototype.includes` would have returned true and never worked.

I wonder how reliable is `CSS.supports` not just in term of syntax, but
actual usability.

Best Regards

On Wed, Mar 25, 2015 at 7:44 PM, Tab Atkins Jr. <jackalmage at gmail.com>
wrote:

> On Sun, Mar 22, 2015 at 3:59 AM, Andrea Giammarchi
> <andrea.giammarchi at gmail.com> 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.
>
> ~TJ
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150325/268363ac/attachment-0001.html>


More information about the es-discuss mailing list