Add ComJSEnv

protected def should have an explicit result type.