fix(web-push): accept WebIDL notifications whose data is a prototype getter (06-01)
Real Notification objects expose `data` as a getter on the prototype, so the own-property check dropped every click. The runtime test now uses a class-based fake with the WebIDL shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4d17259037
commit
8522cb5256
@@ -273,7 +273,9 @@ function notificationClickEventFacade(
|
||||
typeof value.waitUntil !== "function" ||
|
||||
!isRecord(value.notification) ||
|
||||
typeof value.notification.close !== "function" ||
|
||||
!Object.hasOwn(value.notification, "data")
|
||||
// 06-01. `data` is a WebIDL getter on `Notification.prototype`, never an
|
||||
// own property, so the check must follow the prototype chain.
|
||||
!("data" in value.notification)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user