Skip to content
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

Events extraction: support "given" for functional events #1654

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Conversation

tidoust
Copy link
Member

@tidoust tidoust commented Aug 24, 2024

The Notifications API now uses "given" to fire a functional event: https://notifications.spec.whatwg.org/#fire-a-service-worker-notification-event

That terminology is aligned with Infra, so we should support it as well.

The code was extracting an event type "given". This update makes it skip "given", as it also skips "named".

The end result for the above example is that the code no longer extracts anything. That is what we want: this is a generic algorithm, the event type "name" is correctly being rejected as being a variable name, and not an actual event type name.

(Detected because "given" triggered a data curation error in Webref)

PS: Also fixed tabs and spaces mixup!!!

The Notifications API now uses "given" to fire a functional event:
https://notifications.spec.whatwg.org/#fire-a-service-worker-notification-event

That terminology is aligned with Infra, so we should support it as well.

The code was extracting an event type `"given"`. This update makes it skip
"given", as it also skips "named".

The end result for the above example is that the code no longer extracts
anything. That is what we want: this is a generic algorithm, the event type
`"name"` is correctly being rejected as being a variable name, and not an
actual event type name.

(Detected because "given" triggered a data curation error in Webref)
@tidoust tidoust merged commit 30b3991 into main Aug 26, 2024
1 check passed
@tidoust tidoust deleted the events-given branch August 26, 2024 08:44
tidoust added a commit that referenced this pull request Aug 26, 2024
Bug fixed:
- Events extraction: support "given" for functional events (#1654)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants