Notification firefox addon

Do you know how I can keep the Notification alive unlimited?!

I saw a YouTube Notification a day ago, and this notification kept alive forever.
Until I closed / clicked (open link) it manually.
That’s exactly what I want. Then I can use the onClose event right (with the X close button).

This is basically the code I use (made it a bit shorter for better overview):

function myNotification(channelName, title) {
  var notification = browser.notifications.create("online_status",{
    "type": "basic",
    "iconUrl": browser.extension.getURL("icons/64.png"),
    "title": title,
    "message": "Click this message to visit the website!"
  });

  browser.notifications.onClicked.addListener(function() {
    browser.tabs.create({"url": "http://www.url.com/" + channelName});
  });
}

Now I really have to figure out, how to keep this notification alive unlimited.
Until a user interaction (manually closed / clicked by user).

This was discussed here recently:

https://discourse.mozilla-community.org/t/windows-notifications-in-firefox-addon/13507/9?u=noitidart

Ok, got it to work. Thanks! :slight_smile: