robertkrimen / otto

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

How do I call a function that I extract from other javascript code #500

Open gakkiismywife opened 1 year ago

gakkiismywife commented 1 year ago

re := regexp.MustCompile((function .*?)</script>) result := re.FindAllString(html, 1) fn = strings.ReplaceAll(result[0], "", "")

how can I call this fn