mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
egui_web: log panics using console.error
This commit is contained in:
@@ -7,8 +7,9 @@ All notable changes to the `egui_web` integration will be noted in this file.
|
||||
* The default painter is now glow instead of WebGL ([#1020](https://github.com/emilk/egui/pull/1020)).
|
||||
* Made the WebGL painter opt-in ([#1020](https://github.com/emilk/egui/pull/1020)).
|
||||
* Fixed glow failure on Chromium ([#1092](https://github.com/emilk/egui/pull/1092)).
|
||||
* Shift-scroll will now result in horizontal scrolling on all platforms ([#1136](https://github.com/emilk/egui/pull/1136)).
|
||||
* Shift-scroll will now result in horizontal scrolling ([#1136](https://github.com/emilk/egui/pull/1136)).
|
||||
* Updated `epi::IntegrationInfo::web_location_hash` on `hashchange` event ([#1140](https://github.com/emilk/egui/pull/1140)).
|
||||
* Panics will now be logged using `console.error`.
|
||||
|
||||
|
||||
## 0.16.0 - 2021-12-29
|
||||
|
||||
@@ -34,6 +34,7 @@ egui_glow = { version = "0.16.0",path = "../egui_glow", default-features = false
|
||||
epi = { version = "0.16.0", path = "../epi" }
|
||||
|
||||
bytemuck = "1.7"
|
||||
console_error_panic_hook = "0.1.6"
|
||||
js-sys = "0.3"
|
||||
ron = { version = "0.7", optional = true }
|
||||
serde = { version = "1", optional = true }
|
||||
|
||||
@@ -281,6 +281,9 @@ impl AppRunner {
|
||||
/// Install event listeners to register different input events
|
||||
/// and start running the given app.
|
||||
pub fn start(canvas_id: &str, app: Box<dyn epi::App>) -> Result<AppRunnerRef, JsValue> {
|
||||
// Make sure panics are logged using `console.error`.
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
let mut runner = AppRunner::new(canvas_id, app)?;
|
||||
runner.warm_up()?;
|
||||
start_runner(runner)
|
||||
|
||||
Reference in New Issue
Block a user