iOS Guides | Samples

MonoTouch.JavaScriptCore Namespace

The JavaScriptCore namespace provides classes that evaluate JavaScript code, parse JSON, and allow manipulation of the JS environment.


To evaluate JavaScript from Xamarin.iOS, application developers instantiate a JSContext, manipulate objects in the JavaScript context by using the JavaScriptCore.Item property, and call the JSContext.EvaluateScript method. Application developers will generally want to at least receive notice of JavaScript exceptions by assigning to the JSContext.ExceptionHandler property.


IJSExportInterface representing the required methods (if any) of the protocol JSExport.
JSClassAttributesEnumerates class attributes.
JSContextEncapsulates a JavaScript engine.
JSContextExceptionHandlerThe delegate that can be used as the JSContext.ExceptionHandler.
JSExportProtocol for exporting Objective-C classes as JavaScript classes.
JSManagedValueClass that maintains a binding between a JavaScript and Objective-C value.
JSPropertyAttributesEnumerates attributes of properties.
JSPropertyDescriptorKeysContains keys that index property descriptors.
JSTypeAn enumeration whose values specify JavaScript types, including Object and undefined.
JSValueHolds a JavaScript value and provides type-testing and conversion functions.
JSVirtualMachineThe JavaScript Virtual Machine, allowing explicit reference-management.