w3ctag / design-principles

A small-but-growing set of design principles collected by the TAG while reviewing specifications
https://w3ctag.github.io/design-principles
176 stars 46 forks source link

More detail on why events should fire before promises #460

Closed jakearchibald closed 6 months ago

jakearchibald commented 10 months ago

Preview | Diff

LeaVerou commented 8 months ago

Hi @jakearchibald! Sorry for the delay. Overall this looks like an improvement and we're leaning positive. Beyond @martinthomson's question, I think it would also benefit from some examples, both positive and negative: an example spec that gets it right, and one where it doesn't. That's not a blocker, since even without them this is an improvement, but it would certainly help!

LeaVerou commented 6 months ago

Somewhat orthogonal to the actual text in the PR, I think it would be great to list a few examples of events and related promises to make what we're talking about more concrete. What are some popular examples of this in the web platform? (either where the guidance is already followed or where it is not)