Calling the Python from JS
Introduction to PylonAPI
The PyloidAPI
class is a core component that enables interaction between JavaScript and Python.
PyloidAPI Properties
The PyloidAPI class has the following important properties:
window
: References the BrowserWindow instance.app
: References the Pyloid application instance.window_id
: Unique identifier for the browser window.
Using the Bridge Decorator
The PyloidAPI
class is used with the Bridge
decorator to make Python methods callable from JavaScript.
Bridge Decorator Parameters
The Bridge
decorator can use the following parameters:
result
: Specifies the return type.args
: Specifies the argument types.
Setting up JavaScript API in Python
Last updated