Instance Method


Initializes a new JavaScript context.


- (instancetype)init;

Return Value

A new JavaScript context.


This initializer creates a context along with a new, independent virtual machine (a JSVirtualMachine object). You cannot pass JavaScript values (JSValue objects) between contexts in different virtual machines. To create contexts that share a virtual machine, use the initWithVirtualMachine: initializer.

See Also

Creating JavaScript Contexts

- initWithVirtualMachine:

Creates a new JavaScript context associated with a specific virtual machine.