That little “highlight” (called a tab attention indicator) is controlled by the browser itself, and you cannot manually trigger it via JavaScript. Browser only shoes this for specific built-in events like:
•alert(), confirm(), or prompt() dialogs.
•some types of audio playing.
•push notifications.
It is a fundamental part of the UX of the browser, hence it can't be controlled whatsoever.