• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    chrome.notifications.onClicked.addListener not supported

    General
    1
    1
    510
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FMaz
      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.

      Reply Quote 0
        1 Reply Last reply
      • Moved from Opera for Windows by  leocg leocg 
      • First post
        Last post

      Computer browsers

      • Opera for Windows
      • Opera for Mac
      • Opera for Linux
      • Opera beta version
      • Opera USB

      Mobile browsers

      • Opera for Android
      • Opera Mini
      • Opera Touch
      • Opera for basic phones

      • Add-ons
      • Opera account
      • Wallpapers
      • Opera Ads

      • Help & support
      • Opera blogs
      • Opera forums
      • Dev.Opera

      • Security
      • Privacy
      • Cookies Policy
      • EULA
      • Terms of Service

      • About Opera
      • Press info
      • Jobs
      • Investors
      • Become a partner
      • Contact us

      Follow Opera

      • Opera - Facebook
      • Opera - Twitter
      • Opera - YouTube
      • Opera - LinkedIn
      • Opera - Instagram

      © Opera Software 1995-