jsre: expose Do

This commit is contained in:
Felix Lange
2016-02-20 14:28:34 +01:00
parent b34b130fb5
commit 5542b51b50
2 changed files with 11 additions and 9 deletions

View File

@ -27,7 +27,9 @@ import (
// evaluated, callers need to make sure that evaluating line does not have side effects.
func (jsre *JSRE) CompleteKeywords(line string) []string {
var results []string
jsre.do(func(vm *otto.Otto) { results = getCompletions(vm, line) })
jsre.Do(func(vm *otto.Otto) {
results = getCompletions(vm, line)
})
return results
}