Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel the requestAnimationFrame when all roots are disconnected #633

Merged

Conversation

Snuffleupagus
Copy link
Contributor

Given that pendingElements was already being cleared, just below, there won't be anything to translate and as far as I can tell keeping the requestAnimationFrame running shouldn't be necessary.

Note that this was found in the PDF.js project, please refer to this discussion, where we're trying to shutdown various asynchronous operations when running tests and currently Fluent make this difficult.

/cc @calixteman, @timvandermeij

Copy link
Member

@eemeli eemeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the right fix; one small nitpick inline to resolve before merging.

fluent-dom/src/dom_localization.js Outdated Show resolved Hide resolved
Given that `pendingElements` was already being cleared, just below, there won't be anything to translate and as far as I can tell keeping the `requestAnimationFrame` running shouldn't be necessary.

Note that this was found in the PDF.js project, please refer to [this discussion](mozilla/pdf.js#18313 (comment)), where we're trying to shutdown various asynchronous operations when running tests and currently Fluent make this difficult.
@Snuffleupagus Snuffleupagus force-pushed the disconnectRoot-cancelAnimationFrame branch from 3ce06a5 to b8142ec Compare June 25, 2024 08:19
@eemeli eemeli merged commit 4833994 into projectfluent:main Jun 25, 2024
3 checks passed
@calixteman
Copy link
Contributor

@eemeli would you mind to make a new release please ?

@eemeli
Copy link
Member

eemeli commented Jun 25, 2024

@calixteman
Copy link
Contributor

Thank you very much.

@Snuffleupagus Snuffleupagus deleted the disconnectRoot-cancelAnimationFrame branch June 25, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants