Clean up wasm-interpreter / winit interface

Use the window attributes hook instead of a private function in the winit backend.
This commit is contained in:
Simon Hausmann 2025-04-08 07:19:27 +02:00 committed by Simon Hausmann
parent ca0c75bfe1
commit 4e65998016
5 changed files with 62 additions and 46 deletions

View file

@ -983,22 +983,6 @@ impl ComponentDefinition {
})
}
/// Instantiate the component for wasm using the given canvas id
#[cfg(target_arch = "wasm32")]
pub fn create_with_canvas_id(
&self,
canvas_id: &str,
) -> Result<ComponentInstance, PlatformError> {
generativity::make_guard!(guard);
Ok(ComponentInstance {
inner: self
.inner
.unerase(guard)
.clone()
.create(WindowOptions::CreateWithCanvasId(canvas_id.into()))?,
})
}
/// Instantiate the component using an existing window.
#[doc(hidden)]
#[cfg(feature = "internal")]