hide ScriptEngine calls from JS

- closes #1825