Comments (5)
it is create_confirmation_dialog
from pywebview.
Yes but that one creates as the name already tells an Yes/No dialog, I am searching for a method to have an alert/message box with an icon (warning/info/error) and an OK button. alert()
in JS shows the built-in error which doesn't look good:
from pywebview.
There is a custom message box implementation that overwrites window.alert
, but it is not enabled for EdgeChromium. I will look into this.
from pywebview.
If you only plan to run on Windows, simply use win32 api like this.
import webview
import ctypes
def my_alert(title, text, flags=0x00001030):
ctypes.windll.user32.MessageBoxW(None, text, title, flags)
window = webview.create_window("Hello world", "https://pywebview.flowrl.com/hello")
window.expose(my_alert)
webview.start(debug=True)
# js: pywebview.api.my_alert("Error", "error while loading")
from pywebview.
I pushed a fix to master
from pywebview.
Related Issues (20)
- Frameless window can not be minimized by clicking its taskbar button HOT 7
- Use window inside of tkinter HOT 6
- iframe cannot call Python HOT 1
- Nuitka support HOT 7
- [WIN] Folder Dialog - New folder is renamed with a delay. HOT 3
- [Maybe bug] The todos app crashed immediately after I run "buildozer -v android debug deploy run" HOT 15
- google account logout after close the pywebview window HOT 4
- any way to edit the response headers (or somehow disable X-Frame-Options)? HOT 9
- How do I unround the corners of a borderless window? HOT 2
- [QUESTION] Can pywebview be embedded anywhere? HOT 4
- How can we lift the CORS restrictions in pywebview? HOT 3
- javascript print() not working with pywebview HOT 3
- There's a problem here HOT 2
- Modernize folderdialog? HOT 4
- how Intercept and filter files or requests ? HOT 2
- `mypy` complains that `webview` doesn't have library stubs or `py.typed` marker HOT 1
- on Windows, create_file_dialog() is not disposing of dialog after ShowDialog() HOT 3
- Add `block` parameter to `webview.start` using multiprocessing HOT 13
- "pip install pywebview" doesn't work : sha hash error HOT 1
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.