Context.evaluateInObject
javascriptcore.value.Value evaluateInObject(string code, void * objectInstance, javascriptcore.class_.Class objectClass, string uri, uint lineNumber, out javascriptcore.value.Value object)Evaluate code and create an new object where symbols defined in code will be added as properties, instead of being added to context global object. The new object is returned as object parameter. Similar to how [javascriptcore.value.Value.newObject] works, if object_instance is not null object_class must be provided too. The line_number is the starting line number in uri; the value is one-based so the first line is 1. uri and line_number will be shown in exceptions and they don't affect the behavior of the script.
Parameters
code | a JavaScript script to evaluate |
objectInstance | an object instance |
objectClass | a #JSCClass or null to use the default |
uri | the source URI |
lineNumber | the starting line number |
object | return location for a #JSCValue. |
Returns
a #JSCValue representing the last value generated by the script.