Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Timeout option is mentioned in docs but isn't supported in the code #3
autoClose option is a little bit tricky... It is set to 0 by default, which means it has no affect and notifications are closed automatically(depends on browsers implementations and MacOS Notification Center settings).
autoClose has no effect for IE - hiding notifications(removing icon and stop highlighting the taskbar button) after few seconds may prevent users from seeing the notification - they may missed it. Plus, in IE could be displayed one notification only. So, in your code you can close the notification manually when user reacts on the notification - for example - if you display notification for incoming call or new chat message received, when user answer/decline or click on the chat message you can call close method of the notification object returned when create is called.
autoClose seems to work fine in Firefox(Win/MacOs)(just fixed it for Firefox - please download the lastest version of the code) and Chrome(Win).
The original poster is referring to your naming. You literally refer to an option named 'timeout', but it is actually 'autoClose' in your code.
A nice auto-close implementation for IE is to attach an event to window.onfocus. It's slightly different of course, but works well (if the bug I am about to post about is fixed...).