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

fix: awaiting updateComplete instead of requestUpdate() #84

Merged
merged 3 commits into from
Aug 6, 2021

Conversation

dlockhart
Copy link
Contributor

requestUpdate no longer returns a Promise in Lit 2.0, so instead you're supposed to await elem.updateComplete.

@dlockhart dlockhart requested a review from svanherk August 5, 2021 13:29
@dlockhart
Copy link
Contributor Author

The failure in Safari is interesting. It's failing because this exception is thrown:

ResizeObserver loop completed with undelivered notifications

Safari only added support for ResizeObserver in January 2020, which could explain why we weren't seeing this before... although there was a successful run two months ago.

The explanation for that error is this:

If any changes are incurred during the callback, then layout happens again, but here, the system finds the shallowest at which depth a change occurred (measured in simple node depth from the root). Any changes that are related to something deeper down in the tree are delivered at once, while any that are not are queued up and delivered in the next frame, and an error message will be sent to the Web Inspector console: (ResizeObserver loop completed with undelivered notifications).

Digging deeper:

I can't figure out why Safari is complaining and the other browsers aren't... everything seems to be happening in the same sequence.

@dlockhart
Copy link
Contributor Author

Raised this as a defect on core to tackle later, skipping the test for now.

@dlockhart dlockhart merged commit d8fd75e into master Aug 6, 2021
@dlockhart dlockhart deleted the dlockhart/fix-requestUpdate branch August 6, 2021 15:29
@ghost
Copy link

ghost commented Aug 6, 2021

🎉 This PR is included in version 4.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants