How do I remove an event listener for notifications?

I’ve almost got my add-on working, but I can’t get the event listener for the notification to go away. It’s an issue because there are multiple situations when a notification is displayed and not all of them should have the onclick function.

I’m currently using the following code to access my onclick function:
chrome.notifications.onClicked.addListener(id => openRating(id));

I’m trying to use chrome.notifications.onClicked.removeListener(), but I can’t get it to work properly because I’m not sure what goes within the brackets. I would assume that the notification ID goes in their, but Firefox doesn’t support notification IDs.

How can I remove that event listener?

Try this:

var cb = id => openRating(id);

chrome.notifications.onClicked.addListener(cb);
chrome.notifications.onClicked.removeListener(cb);

That worked. Thanks!