Commit Graph

3 Commits

Author SHA1 Message Date
Emil Ernerfeldt ea71b7f20b
eframe web: detect and report panics during startup (#2992)
* Detect panics during initialization and show them to the user

* PanicHandler now also logs the panics

* Add example of how to call into your app from JS

* Refactor: break out AppRunner and AppRunnerRef to own files

* Hide AppRunner

* Simplify user code

* AppRunnerRef -> WebRunner

* Better docs

* Don't paint until first animation frame

* Update multiple_apps.html

* Update web demo

* Cleanup and fixes

* left-align panic message in html
2023-05-16 22:22:09 +02:00
Emil Ernerfeldt ac50fa0d94
eframe web: Better panic handling (#2942)
* Refactor: remove extra store of events

* Remove unnecessary extra function

* Refactor: simplify event registering

* Store panic summary

* egui_demo_app: move web-part to own module

* index.html: await

* Properly unsubscribe from events on panic

* Better error handling

* Demo app html: hide the wasm canvas and show an error message on panic

* egui_demo_app: add panic button to test panic response on web

* fix typo

* Use a constructor to create WebHandle

* Refactor: less use of locks in the interfaces

* More consistent naming
2023-04-21 08:33:01 +02:00
Stanislav 64496cacb9
Graceful exit from web (#1650)
Return a handle that can be used to stop a running egui instance.
2022-08-02 17:42:55 +02:00