@yelon/util
Version:
9 lines (8 loc) • 525 B
TypeScript
import { InjectionToken } from '@angular/core';
import { Observable } from 'rxjs';
/**
* Use the `visibilitychange` event to monitor whether the browser tab is visible, which is generally used when the user leaves the browser tab to temp interrupt the backend to continue sending requests
*
* 通过 `visibilitychange` 事件来监听浏览器选项卡是否可见,一般用于当用户离开应用时暂时中断后端持续发送请求时
*/
export declare const PAGE_VISIBILITY: InjectionToken<Observable<boolean>>;