module

JSCContext

JSCContext represents a JavaScript execution context

Class methods

get_value(name : String)

Equivalent to JavaScript window[name]

json = JSCContext.get_value "JSON"
# Do somethings with JSON object, e.g: json["parse"].call(JSCPrimative.new "{a:2}")
Source
set_value(name : String, value)

Set a property of the context's global object, in this case window

JSCContext.set_value "hello", JSCPrimative.new "world"
Source