+1  A: 

I can't test this because I'm on a mac and getting Growl notifications from jetpack.notifications.show, and Growl constrains the width, but try changing myBody to this:

var myBody = line1 + '\n' + line2 + '\n' + line3 + '\n' + line4;

The line breaks do show up for me, so this might be what you're looking for.

EDIT: This does not work for the Windows toast notifications, so it doesn't answer the question. However, it will show newlines in Growl notifications for Mac OS X, so I'm leaving this answer up.

Rudd Zwolinski
Thanks, but this does not work for me on Firefox 3.5b4 on WinXP.
eleven81
did test with \n character, with \r character and with <br> tag, but nothing seems to work. I assume it's not possible to force newlines in notifications
Rafael
Did you try \n\r ?
Rich Bradshaw
@Rich Bradshaw: yes, I did try the \n\r and \r\n, but nothing worked.
Rafael
A: 

IIRC correctly, jetpack uses JavaScript and HTML, so just try adding <br /> between the lines.

Ólafur Waage
Thank you, but this does not help. The <br /> tags just show up as if they were part of the notification text.
eleven81
+4  A: 

Unfortunately, the alert created doesn't allow new lines for the toast popup in Windows. According to the Jetpack API:

Eventually, this object will be the end-all be-all of easy communication with your users. Notification bars, transparent messages, Growls, doorknob messages, and so forth will all go through here. For now, it just has simple notifications.

As shown in the source code, the jetpack.notifications.show method makes a call to the Mozilla nsIAlertsService, which doesn't allow multiple lines for the Windows toast popups.

The upside is that the API indicates that you'll have much more control over alerts in the future, but for the pre-release version you'll have to keep your notification text down to a minimum.

Rudd Zwolinski