Skip to content

Commit

Permalink
Add 'hasFocus' boolean to the payload body (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
MacroPower committed Mar 22, 2021
1 parent 6a44f7a commit 8d82552
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export type User = {
export type Payload = {
uuid: string;
type: EventType;
hasFocus: boolean;
options: AnalyticsOptions;
host: HostInfo;
dashboard: DashboardInfo;
Expand Down Expand Up @@ -173,6 +174,7 @@ export function getPayload(
return {
uuid: uuid,
type: EventType,
hasFocus: window.document.hasFocus(),
options: options,
host: host,
dashboard: dashboard,
Expand Down

0 comments on commit 8d82552

Please sign in to comment.