Chen
Chen

Reputation: 970

Make Google Chrome Browser Icon Flash on task bar

I am building a web app when the user finds a match, the browser icon in the task bar will flash orange. Could I achieve this with HTML and JavaScript code?

Shown in the picture below (but for the Google Chrome icon):

enter image description here

Upvotes: 1

Views: 2755

Answers (1)

Libra
Libra

Reputation: 2595

Chrome only flashes when the browser announces an alert, so printing an alert with javascript could be a workaround for the intended result. Keep in mind it also only does this if you are not currently focused on chrome. Hit run and quickly tab out to see what I mean.

jQuery(document).ready(function($) {
	alert("Flash you Chrome, flash!");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

Upvotes: 3

Related Questions