chrome.notifications.onClicked.addListener not supported
-
FMaz last edited by
Using opera 117.0.5408.39,
I have a browser extension using Manifest V3, and the following code in a service worker:chrome.notifications.create( "item-" + id, { type: "basic", iconUrl: img_url, title: title, message: description, priority: 2, }, (notificationId) => { if (chrome.runtime.lastError) { console.error("Notification error:", chrome.runtime.lastError); } }
The part above works well, and the notifications get displayed. However, the following event listener never gets triggered:
chrome.notifications.onClicked.addListener((notificationId) => { console.log("notificationId", notificationId); });
Testing it myself, I tried swapping the onClicked for onButtonClicked, without any luck.
It was reported to me by one of my user complaining that the feature "no longer works", so I am wondering if it's possible that Opera had a regression as my code has not changed.
My actual listener normally open a tab a specific URL, Opera appear to open a window with a blank tab in it and disregard the event listener entirely.
-
leocg