Multiline add-on notifications

Hi there,

I’m developing a Firefox extension that shows a notification when somebody is calling you through a remote PBX. I want to show some structured data (no more than 3 fields) on the notification but I’m not able to show multiline browser.notifications with firefox.

I got this working on Chromium/Chrome with this code:

chrome.notifications.create('mypbxmessage', {
  type: 'basic',
  iconUrl: 'one-icon.png',
  priority: 2,
  title: "Some title",
  message: " this is a multiline \n message showing properly \n on chrome notification"
});

I would even prefer using “list” type, but I know this is (still?) not possible on Firefox. So what about multiline messages? Are they possible? I have found a 8 years old message on stackoverflow saying it wasn’t possible at the moment but nothing more recent, so I would appreciate any feedback about this to keep on trying or directly take another approach.

Thanks,

I am using multi line notifications via \n as you can see here:

Not sure why it does not work for you. What OS are you on? Maybe that matters.

I’m using Debian 10 and Gnome 3.22

Now, I realized that notifications are shown in a single line, but if i hover the message this expands to a multiline notification.

This isn’t the expected behaviour and doesn’t happen with Chromium, but it seems alright.