1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Use canvas directly (#4780)

This commit is contained in:
Jan Procházka
2024-07-15 18:59:15 +02:00
committed by GitHub
parent cb9f30482f
commit 0d89e31e3e
10 changed files with 22 additions and 27 deletions

View File

@@ -31,12 +31,12 @@ impl AppRunner {
/// # Errors
/// Failure to initialize WebGL renderer, or failure to create app.
pub async fn new(
canvas_id: &str,
canvas: web_sys::HtmlCanvasElement,
web_options: crate::WebOptions,
app_creator: epi::AppCreator,
text_agent: TextAgent,
) -> Result<Self, String> {
let painter = super::ActiveWebPainter::new(canvas_id, &web_options).await?;
let painter = super::ActiveWebPainter::new(canvas, &web_options).await?;
let system_theme = if web_options.follow_system_theme {
super::system_theme()