W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2020

Re: [csswg-drafts] [web-animations-1] Ordering of promises and events, and where events are fired (#5582)

From: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Oct 2020 03:23:18 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-704668540-1602040997-sysbot+gh@w3.org>
> The animation spec is already having to hack around the ordering by [creating a microtask checkpoint in step 3](https://drafts.csswg.org/web-animations/#update-animations-and-send-events). This is why I think the order is incorrect, as every spec that wants to follow this ordering will have to add a microtask checkpoint before event dispatch.

Ah, I see. I don't recall exactly the thinking there except I believe I thought Promise callbacks should happen before events, but it sounds like it should be the other way around.

> Spec wise, it would involve adding the promise, value, and resolve/reject along with the event info in the event queue.

Yes, that sounds right.

> I don't if this would break existing code (the finished promise is relatively new in Chrome), but it'd be sad if web animation becomes an outlier in terms of event & promise ordering.

I'm all for trying it. It would be nice if Chrome could go first with trying to ship it.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5582#issuecomment-704668540 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 7 October 2020 03:23:20 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:20 UTC