Share via


JavaScriptCore Namespace

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

Classes

Name Description
JSContext

Encapsulates a JavaScript engine.

JSExport

Protocol for exporting Objective-C classes as JavaScript classes.

JSManagedValue

Class that maintains a binding between a JavaScript and Objective-C value.

JSPropertyDescriptorKeys

Contains keys that index property descriptors.

JSValue

Holds a JavaScript value and provides type-testing and conversion functions.

JSVirtualMachine

The JavaScript Virtual Machine, allowing explicit reference-management.

Interfaces

Name Description
IJSExport

Protocol for exporting Objective-C classes as JavaScript classes.

Enums

Name Description
JSClassAttributes

Enumerates class attributes.

JSPropertyAttributes

Enumerates attributes of properties.

JSRelationCondition
JSType

An enumeration whose values specify JavaScript types, including Object and undefined.

Delegates

Name Description
JSContextExceptionHandler

The delegate that can be used as the ExceptionHandler.

JSPromiseCreationExecutor

Remarks

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