()
| 53 | // Pixels in the viewport are only on screen when the tab is the active one and |
| 54 | // the browser window itself has focus. |
| 55 | export const isPageInFocus = (): boolean => |
| 56 | globalThis.document.visibilityState === 'visible' && |
| 57 | globalThis.document.hasFocus(); |
| 58 | |
| 59 | export interface ViewabilityData extends ViewabilityCriteria { |
| 60 | /** Milliseconds between the creative rendering and meeting the criteria. */ |
no outgoing calls
no test coverage detected