tkwebview2 icon indicating copy to clipboard operation
tkwebview2 copied to clipboard

js_api not available in tkwebview2

Open B16f00t opened this issue 1 year ago • 1 comments

Description:

Currently, js_api is not available in tkwebview2 to pass Python methods or data from JavaScript in the WebView. Although the js_api parameter is passed when creating a WebView2 instance, JavaScript cannot invoke Python functions or send data back to the Python environment.

Expected Behavior:

It should be possible for JavaScript to invoke Python methods and pass data, similar to how it works in other libraries like pywebview. This functionality would allow interaction between JavaScript and Python, such as calling Python functions when a button is clicked in the WebView's HTML.

B16f00t avatar Dec 05 '24 08:12 B16f00t

See https://github.com/Smart-Space/tkwebview please.

Smart-Space avatar Aug 06 '25 03:08 Smart-Space