Upravit

Sdílet prostřednictvím


JavaScriptCore Namespace

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

Classes

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

IJSExport

Interface representing the required methods (if any) of the protocol JSExport.

Enums

JSClassAttributes

Enumerates class attributes.

JSPropertyAttributes

Enumerates attributes of properties.

JSType

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

Delegates

JSContextExceptionHandler

The delegate that can be used as the ExceptionHandler.

Remarks

To evaluate JavaScript from Xamarin.iOS, application developers instantiate a JSContext, manipulate objects in the JavaScript context by using the P:JavaScriptCore.Item 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.