module JSCContext
Overview
JSCContext represents a JavaScript execution context
Defined in:
components/jsc_context.crClass Method Summary
-
.get_value(name : String)
Equivalent to JavaScript
window[name]
-
.set_value(name : String, value)
Set a property of the context's global object, in this case
window
Class Method Detail
def self.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}")
def self.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"