On Thu, Jul 11, 2019 at 9:47 PM Joel Scarfone <
joelrs...@gmail.com> wrote:
> Is there a way from the embedder's side to force a script to be compiled in strict mode?
There's a `--use_strict` flag you can pass on the command line or
through V8::SetFlagsFromString() but it's a global setting.
If you load a script as an ES module, it's always executed in strict mode.
Last but not least, you can always prepend the script code with a
`'use strict';`. That will throw off line numbers in error messages
but you might be able to fix that by passing in a ScriptOrigin with
its line offset set to -1.