robertkrimen / otto

A JavaScript interpreter in Go (golang)
http://godoc.org/github.com/robertkrimen/otto
MIT License
8.07k stars 583 forks source link

parser not ES10 or ES2018 #522

Open weaweawe01 opened 4 months ago

weaweawe01 commented 4 months ago

ES10 BigInt

alert(1n)

ES2018

<script>(asyncfunction*(){})['constructor']('alert(document.domain)')().next();</script>

image image

Asday commented 4 months ago

https://github.com/robertkrimen/otto?tab=readme-ov-file#caveat-emptor

  • Otto targets ES5. ES6 features (eg: Typed Arrays) are not supported.

Pull requests are welcome.