Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

MV3 no result on notification update

91 views
Skip to first unread message

Алексей Гамов

unread,
Dec 10, 2024, 5:52:21 AM12/10/24
to Chromium Extensions
Hi. Trying to move my extension from MV2 to MV3.

I faces strange situation while trying to chrome.notification.update() existing notification.
It's successful for first time, but no reaction and no errors on next tries.

Here is a code that works great on MV2 version of extension:
```
const contents = {
type: 'basic',
iconUrl: '../assets/icon.png',
title: data.state,
message: data.number,
buttons: [{title: platform.i18n.getMessage('endcall')}],
silent: true,
requireInteraction: true
};

chrome.notifications.getAll((items) => {
if (items.hasOwnProperty('ctc')) chrome.notifications.update('ctc', contents);
else chrome.notifications.create('ctc', contents);
});
```

So and API wasn't changed as i know. How to fix?

Roberto Oneto

unread,
Dec 11, 2024, 8:29:22 AM12/11/24
to Chromium Extensions, Алексей Гамов
Reply all
Reply to author
Forward
0 new messages