commitStyles() has existed for years, but now in Firefox, it behaves like I always thought it…
@jaffathecake108K followers
10,872 views
16 Comments
Comments from the original post on X (Twitter)

@jaffathecake
The task scheduling API helps you take a large synchronous task, and chunk it up into smaller pieces, yielding to the event loop and rendering along the way. It’s now in Chrome & Firefox, but there’s a polyfill for Safari users.
87 likes

@jaffathecake
URLPattern lets you parse URLs using familiar route syntax. It’s now in Chrome & Firefox, but it’s likely to land in the next version of Safari.
110 likes

@jaffathecake
Yay! It's the first Firefox release since I've joined the team, so let's take a look at some of the new developer-facing features in Firefox 142… 🧵
524 likes

@jaffathecake
…And that’s not all! See for more features, fixes, and tooling updates.
35 likes

@daisuke
Peter Storm!!
1 like

@kvndy
Both fillMode and commitStyles are hacks obviated by additive and relative animation, relative to the specified style, from the delta to zero. CSS Transitions Faster Reversal too, these are all unnecessary, sub-optimal solutions. Why can’t the browser calculate the “FLIP” for us?

@jaffathecake
Doesn't the view transition API handle the 'FLIP' case really well?

@kvndy
Handling of interruption and retargeting performs as CSS Animations. Jumps to destination. Animations don’t blend together but they could, using the easing function

@CyberAP
So .finished resolves exactly 1 frame before the styles return back to initial state or do we get a 1 frame jump before the styles are committed?

@jaffathecake
They haven't changed when finished resolves, it's more that commitStyles knows to apply the final state in that case. This all happens before the next paint, so there's no visual jump.
1 like

@JvdMeulen
Ik waardeer je inzet vanuit het verleden enorm maar dit is een beetje zoals wij Nederlanders zeggen: “wij van wc-eend”.

@jaffathecake
It's fair to question everything, but I invite you to judge the actual content here. What's your issue?

@JvdMeulen
It’s not the technical stuff, it’s more like “they were lacking behind, but now I’m here and everything is great again”.

@jaffathecake
I was upfront about features that were also in other browsers, even if they were in previews, or just being worked on. If I was as dishonest as you're painting me, I wouldn't have mentioned any of that.

@jaffathecake
And I absolutely reject your accusation that I'm making out that I'm the reason anything has changed.
1 like

@JvdMeulen
Not accusing, assuming. That’s how it “felt”. I’m sorry that I’m being to harsh. I didn’t mean to be mean/ignorant.