mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-20 16:17:08 +02:00
fix(common/scripting): set languageVersion to ES6
This commit is contained in:
parent
d8d4f4926d
commit
ff43a557d7
@ -9,6 +9,7 @@ import org.mozilla.javascript.Wrapper
|
|||||||
fun contextScope(f: Context.() -> Any?): Any? {
|
fun contextScope(f: Context.() -> Any?): Any? {
|
||||||
val context = Context.enter()
|
val context = Context.enter()
|
||||||
context.optimizationLevel = -1
|
context.optimizationLevel = -1
|
||||||
|
context.languageVersion = Context.VERSION_ES6
|
||||||
try {
|
try {
|
||||||
return context.f().let {
|
return context.f().let {
|
||||||
if (it is Wrapper) {
|
if (it is Wrapper) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user