2

I am not sure exactly how to ask this question as I am not sure of the terminology I should use. I am writing a web application that is essentially a browser based IRC client. I wish to replicate some functionality I see in clients like x-chat where when you get a personal message it will alert the window manager. In my window manager (Aweosme wm) it turns the program tab red, in windows I imagine it would cause the programs button on the task bar to blink.

Essentially it's a notification that tells the window manager that something has happened and the program wants your attention.

  • What is the terminology for this functionality?
  • Is it possible to make a webapp tell the browser to do this?
  • If 'B' is yes then how?
Exodist
  • 629
  • 5
  • 15

2 Answers2

0

You don't have an API to use notifications in webapps. Just because there are a lot of different notification systems in different OS (Growl in Mac OS X, system tray notifications in MS Windows and several window managers API in Linux). In Mac OS X and Linux, by default, you don't have any notification system installed.

Gleb M Borisov
  • 617
  • 3
  • 10
0

You can't really make your browser window blink in the task bar. For HTML5 a Notification API was planned and so far Chrome supports it, but it seems that it was dropped again.

The only cross-browser possibilities to get the attention of your users are either to set the focus of the window:

window.focus();

or to change the title of your page:

document.title = "New message!";

See also this SO answer for a nice "blinky" implementation of changing document.title.

Community
  • 1
  • 1
Martin Buberl
  • 45,844
  • 25
  • 100
  • 144