Add cleanup code to web backend, mostly web-sys#1715
Merged
ryanisaacg merged 7 commits intorust-windowing:masterfrom Sep 20, 2020
Merged
Add cleanup code to web backend, mostly web-sys#1715ryanisaacg merged 7 commits intorust-windowing:masterfrom
ryanisaacg merged 7 commits intorust-windowing:masterfrom
Conversation
Contributor
Author
|
cc @ryanisaacg |
ryanisaacg
approved these changes
Sep 20, 2020
Contributor
ryanisaacg
left a comment
There was a problem hiding this comment.
Looks good, though I think the compile errors mean you have to stub out some methods for stdweb.
e6f0ed8 to
ab7d9bc
Compare
- Drops the Runner, which causes the event handler closure to be dropped. - (web-sys only:) Remove event listeners from DOM.
The canvas was inserted by the user, so it should be up to the user whether the canvas should be removed.
ab7d9bc to
05a451c
Compare
Contributor
Author
|
I even got the changelog wrong somehow. Now fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo fmthas been run on this branchcargo docbuilds successfullyCHANGELOG.mdif knowledge of this change could be valuable to users(copied from changelog:)
Event::LoopDestroyedevent is correctly emitted when leaving the page.(web-sys only), theWindowEvent::Destroyedevent now gets emitted when aWindowis dropped.Windowis dropped or when the event loop is destroyed.(web-sys only), the event handler closure passed toEventLoop::runnow gets dropped after the event loop is destroyed.Windowis no longer removed from the DOM when theWindowis dropped.Closes #1688