We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example: This is the example of event usage in the tutorial
click_handler_method = "alert(JSON.stringify(event.data));" click_handler = click_chart.on("click", click_handler_method)
Which will generate something like this in JS:
click_handler_method = event => { alert(JSON.stringify(event.data)); } click_handler = chart.on("click", click_handler_method)
The same could be supported with Python syntax:
click_handler_method = "js.alert(json.dumps(event.data))" click_handler = click_chart.on("click", click_handler_method)
Which would generate something like this in JS:
<script src="https://cdn.jsdelivr.net/pyodide/v0.22.1/full/pyodide.js"></script>
let pyodide = await loadPyodide(); let click_handler_method = (event) => { let handler = pyodide.runPython(` def handler(x): js.alert(json.dumps(event.data)) handler `); handler(event); }; click_handler = click_chart.on("click", click_handler_method)
The text was updated successfully, but these errors were encountered:
or micropython https://micropython.org/
Sorry, something went wrong.
No branches or pull requests
Example:
This is the example of event usage in the tutorial
Which will generate something like this in JS:
The same could be supported with Python syntax:
Which would generate something like this in JS:
The text was updated successfully, but these errors were encountered: