How to make a Flash browser icon in TaskBar on a specific event in WebApplication - jQuery

I am working with SignalR in a web application and I want the browser icon to be orange in the taskbar when a client receives a message from the hub.

The code inside the hub.

public void PrivateMessage(string UserName, string Message)
{
    Clients.All.newmessage(UserName, Message);
}

The answer from the Hub code is jQuery, where the message is received on the cshtml page.

var chat = $.connection.chatHub;

    chat.client.newmessage= function (UserName,Message) {

     $("#conversation").append('<li>' + UserName + ':' + Message + '</li>');

    };

Here, after adding a message, I want to skip the browser icon if the user minimizes the window. It should also work in all browsers, i.e. in Chrome, Firefox, Safari.

Thanks in advance. let me know if anyone has a solution.

+4
source share

Source: https://habr.com/ru/post/1674356/


All Articles