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

Respect StreamElement.render async function #1040

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

artinboghosian
Copy link
Contributor

@artinboghosian artinboghosian commented Feb 24, 2025

The StreamElement.render property is set to an async function in Turbo (see https://github.com/hotwired/turbo/blob/main/src/elements/stream_element.js#L29 and https://github.com/hotwired/turbo/blob/main/src/elements/stream_element.js#L167). As a result we should respect the async nature of the function and only dispatch the after render event once we know rendering has completed, by awaiting render to finish.

The StreamElement.render property is set to an async function in Turbo (see https://github.com/hotwired/turbo/blob/main/src/elements/stream_element.js#L29). As a result we should respect the async nature of the function and only dispatch the after render event once we know rendering has completed, by awaiting render to finish.
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.

1 participant