Skip to content

Commit

Permalink
web: Do not remove canvas from DOM when dropping Window
Browse files Browse the repository at this point in the history
The canvas was inserted by the user, so it should be up to the user
whether the canvas should be removed.
  • Loading branch information
alvinhochun committed Sep 20, 2020
1 parent 9ab1dd6 commit 0d6817c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/platform_impl/web/stdweb/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ pub struct Canvas {
wants_fullscreen: Rc<RefCell<bool>>,
}

impl Drop for Canvas {
fn drop(&mut self) {
self.raw.remove();
}
}

impl Canvas {
pub fn create(attr: PlatformSpecificWindowBuilderAttributes) -> Result<Self, RootOE> {
let canvas = match attr.canvas {
Expand Down
6 changes: 0 additions & 6 deletions src/platform_impl/web/web_sys/canvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ struct Common {
wants_fullscreen: Rc<RefCell<bool>>,
}

impl Drop for Common {
fn drop(&mut self) {
self.raw.remove();
}
}

impl Canvas {
pub fn create(attr: PlatformSpecificWindowBuilderAttributes) -> Result<Self, RootOE> {
let canvas = match attr.canvas {
Expand Down

0 comments on commit 0d6817c

Please sign in to comment.