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