Replies: 1 comment 1 reply
-
Hi @Autism-al, Have you seen https://nicegui.io/documentation/run_javascript#run_javascript? It shows how to await an async JavaScript function. If this does not help, I kindly ask you to create a minimum reproducible code example so that we can dive into your problem more easily. Thanks! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
For example, my JS code has a function that returns an array, and I need to receive this array in Python to complete data processing and display the final result using nicegui. It seems that it cannot pass values in the run_ JavaScript way as described in the document.
I imported it into Nicegui:
ui.add_body_html("""<script type="module" src="js/GetData.js">import {generateData} from "/js/GetData.js";</script>""")
I would like to know how to get the return value of this function to python. Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions