Is there a way that doesn't rely on eval or eval-like mechanisms?

On Fri, Mar 8, 2019 at 1:55 PM Boris Zbarsky <bzbar...@mit.edu> wrote:

> On 3/7/19 6:14 PM, rekt...@gmail.com wrote:
> > Is there any way to feature detect support for import() syntax?
>
> In Firefox, yes, as far as I can tell:
>
>    try {
>      new Function("import('')");
>      // supported
>    } catch (e) {
>      // not supported
>    }
>
> -Boris
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to