Skip to main content
Glama
JsScope.kt1.08 kB
package maestro.js import org.mozilla.javascript.Scriptable import org.mozilla.javascript.ScriptableObject class JsScope( private val root: Boolean, ) : ScriptableObject() { override fun get(name: String?, start: Scriptable?): Any? { if (!root) { return super.get(name, start) } val original = super.get(name, start) if (original == NOT_FOUND) { return null } return original } override fun get(index: Int, start: Scriptable?): Any? { if (!root) { return super.get(index, start) } val original = super.get(index, start) if (original == NOT_FOUND) { return null } return original } override fun get(key: Any?): Any? { if (!root) { return super.get(key) } val original = super.get(key) if (original == NOT_FOUND) { return null } return original } override fun getClassName(): String { return "JsScope" } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobile-dev-inc/Maestro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server