Is there a "Extension is hidden" callback?

Or equally - something that tells me the viewer has navigated away from the Extension - so I can do some auto-saving (much like Apps have onSuspend / onTerminate). I know theres a bunch of hacky web ways for user navigation - but wondering if theres a proper way to do it. I seem to recall somewhere there is a “onVisible” callback but can’t find the opposite…Thanks!