w3c / reffy

Reffy is a Web spec crawler and analyzer tool. It is notably used to update Webref
MIT License
69 stars 23 forks source link

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

Closed tidoust closed 2 weeks ago

tidoust commented 3 weeks ago

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!!!