-
Notifications
You must be signed in to change notification settings - Fork 47
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
Guidance on events and promises #119
Comments
Yeah, queue a task to
|
Worth amending The Guide? Might avoid a situation like happened with Screen Orientation (now causing issues downstream). |
https://www.w3.org/2001/tag/doc/promises-guide#queue-tasks goes into it, though is also partially wrong in suggesting you can avoid queuing tasks. I'd add advice like this to https://w3ctag.github.io/design-principles/#event-design somewhere as this promises guide needs to have its useful bits folded into IDL and then go away... |
@kenchris, or someone on the TAG with sufficient privileges, could you please transfer this bug to the design guide? |
An issue came up recently in for the Screen Orientation lock API where by we have a promise being resolved and event being dispatched due to some action (the screen locking to a new orientation, which can trigger a "change" event).
The question that came up is:
The closest the Promise Guide comes to providing guidance is in the "one time events" section. My reading of that section is that the event should fire fist, and then the promise is resolved based on that action (e.g., "the image loaded, .then(...)", "the orientation locked, .then(...)" and so on).
The text was updated successfully, but these errors were encountered: