On Thu, Jul 11, 2019 at 9:47 PM Joel Scarfone <joelrscarf...@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. -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAHQurc9RwXK9sFi20W%2Bsj_SJ8rP3ZwN-uwc7U9%2BRdFH1yudDAg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.