1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-28 07:23:13 -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

@@ -57,7 +57,7 @@ impl WebRunner {
/// Failing to initialize graphics, or failure to create app.
pub async fn start(
&self,
canvas_id: &str,
canvas: web_sys::HtmlCanvasElement,
web_options: crate::WebOptions,
app_creator: epi::AppCreator,
) -> Result<(), JsValue> {
@@ -67,7 +67,7 @@ impl WebRunner {
let text_agent = TextAgent::attach(self)?;
let runner = AppRunner::new(canvas_id, web_options, app_creator, text_agent).await?;
let runner = AppRunner::new(canvas, web_options, app_creator, text_agent).await?;
{
// Make sure the canvas can be given focus.