mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Don't install console panic hook and tracing wasm subscriber in egui_web (#1230)
Do so in egui_demo_app instead
This commit is contained in:
@@ -13,6 +13,12 @@ use eframe::wasm_bindgen::{self, prelude::*};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[wasm_bindgen]
|
||||
pub fn start(canvas_id: &str) -> Result<(), wasm_bindgen::JsValue> {
|
||||
// Make sure panics are logged using `console.error`.
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
// Redirect tracing to console.log and friends:
|
||||
tracing_wasm::set_as_global_default();
|
||||
|
||||
let app = egui_demo_lib::WrapApp::default();
|
||||
eframe::start_web(canvas_id, Box::new(app))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user