On Web, add WindowBuilderExtWebSys::with_append() (#2953)
This commit is contained in:
parent
5b5ebc25d8
commit
b63164645b
6 changed files with 31 additions and 6 deletions
|
|
@ -66,6 +66,11 @@ pub trait WindowBuilderExtWebSys {
|
|||
///
|
||||
/// Enabled by default.
|
||||
fn with_focusable(self, focusable: bool) -> Self;
|
||||
|
||||
/// On window creation, append the canvas element to the web page if it isn't already.
|
||||
///
|
||||
/// Disabled by default.
|
||||
fn with_append(self, append: bool) -> Self;
|
||||
}
|
||||
|
||||
impl WindowBuilderExtWebSys for WindowBuilder {
|
||||
|
|
@ -86,6 +91,12 @@ impl WindowBuilderExtWebSys for WindowBuilder {
|
|||
|
||||
self
|
||||
}
|
||||
|
||||
fn with_append(mut self, append: bool) -> Self {
|
||||
self.platform_specific.append = append;
|
||||
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
/// Additional methods on `EventLoop` that are specific to the web.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue