Comments (3)
It might be possible by modifying response headers. There is an ongoing effort to add header editing support in #1371
from pywebview.
Thank you very much for your reply. I would like to ask if there is a direct interaction function now. For example, there is window.send('str')
in the python code, and then there is a Javascript
function in the webview
to receive it. The application scenario is when a js
calls python-api. , can return data multiple times, for example: thread
from pywebview.
You can proxy XHR requests via JS API. In other words you would fetch data in Python and make it available to your frontend via JS API. Something like this
Python
class API:
def fetchData(self):
return urlopen(..)
webview.create_window(..., js_api=Api())
Javascript
pywebview.api.fetchData().then(response => response)
from pywebview.
Related Issues (20)
- how to build android apk HOT 7
- webview tag in pywebview HOT 6
- Support transparency with blurred background. HOT 1
- Drag Area cannot be initialized by a script after page loads. HOT 3
- RangeError: Maximum call stack size exceeded. HOT 7
- Frameless window can not be minimized by clicking its taskbar button HOT 4
- Use window inside of tkinter HOT 4
- iframe cannot call Python HOT 1
- Nuitka support HOT 7
- [WIN] Folder Dialog - New folder is renamed with a delay. HOT 2
- [Maybe bug] The todos app crashed immediately after I run "buildozer -v android debug deploy run" HOT 13
- google account logout after close the pywebview window HOT 4
- any way to edit the response headers (or somehow disable X-Frame-Options)? HOT 7
- How do I unround the corners of a borderless window?
- [QUESTION] Can pywebview be embedded anywhere? HOT 2
- javascript print() not working with pywebview HOT 1
- There's a problem here HOT 2
- Modernize folderdialog? HOT 1
- [Feature] Message Box function HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywebview.