This module offers a low-level interface to the Mozilla SpiderMonkey JavaScript engine.
This is the type of JavaScript objects. Such objects can only be created via Pymonkey calls like Context.new_object() or through the execution of JS code, but this type object can be used with Python’s built-in isinstance() to verify that an object is a JS object, like so:
>>> obj = pymonkey.Runtime().new_context().new_object()
>>> isinstance(obj, pymonkey.Object)
True
This is the type of JavaScript context objects. Contexts can only be created via a call to Runtime.new_context(), but this type object can be used with Python’s built-in isinstance() to verify that an object is a context, like so:
>>> cx = pymonkey.Runtime().new_context()
>>> isinstance(cx, pymonkey.Context)
True
Creates a new JavaScript runtime. JS objects created by the runtime may only interact with other JS objects of the same runtime.