refactor(service-worker): Format comments and add additional test (#25860)
- Format JSDoc for notificationClicks - Add comment on why handleClick does not use hasOwnProperty - Add additional test that uses handleClick without action PR Close #25860
This commit is contained in:
@ -309,6 +309,8 @@ export class Driver implements Debuggable, UpdateSource {
|
||||
notification.close();
|
||||
|
||||
const options: {-readonly[K in keyof Notification]?: Notification[K]} = {};
|
||||
// The filter uses `name in notification` because the properties are on the prototype so
|
||||
// hasOwnProperty does not work here
|
||||
NOTIFICATION_OPTION_NAMES.filter(name => name in notification)
|
||||
.forEach(name => options[name] = notification[name]);
|
||||
|
||||
|
Reference in New Issue
Block a user