-
Notifications
You must be signed in to change notification settings - Fork 319
Unify the event skipping algorithm when there is no event handler. #1417
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
Conversation
This makes fetch events, functional events, and message events use the same algorithm to determine whether to skip firing the event, and makes it a *may* rather than *must*. It also unifies the concept of a stale registration to reduce duplicated text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Much less copy & paste going on. Just one question:
docs/index.bs
Outdated
@@ -2926,7 +2934,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |||
The |task| *must* use |activeWorker|'s [=event loop=] and the [=handle functional event task source=]. | |||
|
|||
1. Wait for |task| to have executed or been discarded. | |||
1. If the time difference in seconds calculated by the current time minus |registration|'s [=last update check time=] is greater than 86400, invoke [=Soft Update=] algorithm with |registration|. | |||
1. If |registration| is [=stale=], then run the [=Soft Update=] algorithm with |registration|. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this also be in parallel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I noticed this too and thought I'd just keep the existing behavior, but yea it looks right to do it in parallel. I'm also wondering if there's a point to "Wait for |task| to have executed..." but will leave it for now.
Thanks, also propagated changes to v1. |
This makes {install,activate,fetch,message} events and
functional events use the same algorithm to determine
whether to skip firing the event, and makes it a may
rather than must.
It also unifies the concept of a stale registration to reduce
duplicated text.
Addresses #1200
Preview | Diff