Perspective - Browser - Event - Tab activated

I'm on 8.1.22

Is there a trick to fired an event on a browser tab activated or on page got focus.

Maybe this can work: system.util.getInactivitySeconds - Ignition User Manual 8.1 - Ignition Documentation

Don't think it can work because I want to fire a script when tab is activated and your solution also require something to fire the system.util.getInactivitySeconds

You can have a view param that is bound to the system.util.getInactivitySeconds value. When it gets reset (or current value < previous value) you can trigger your logic.