This struct represents the JS Promise type in Python using our custom pythonmonkey.promise type.
More...
#include <PromiseType.hh>
|
static PyObject * | getPyObject (JSContext *cx, JS::HandleObject promise) |
| Construct a new PromiseType object from a JS::PromiseObject.
|
|
static JSObject * | toJsPromise (JSContext *cx, PyObject *pyObject) |
| Convert a Python awaitable object to JS Promise.
|
|
This struct represents the JS Promise type in Python using our custom pythonmonkey.promise type.
◆ getPyObject()
PyObject * PromiseType::getPyObject |
( |
JSContext * |
cx, |
|
|
JS::HandleObject |
promise |
|
) |
| |
|
static |
Construct a new PromiseType object from a JS::PromiseObject.
- Parameters
-
cx | - javascript context pointer |
promise | - JS::PromiseObject to be coerced |
- Returns
- PyObject* pointer to the resulting PyObject
◆ toJsPromise()
JSObject * PromiseType::toJsPromise |
( |
JSContext * |
cx, |
|
|
PyObject * |
pyObject |
|
) |
| |
|
static |
Convert a Python awaitable object to JS Promise.
- Parameters
-
cx | - javascript context pointer |
pyObject | - the python awaitable to be converted |
The documentation for this struct was generated from the following files: