Skip to content

Commit

Permalink
Add {{AvailableInWorkers}} for Idle Detection API (#36225)
Browse files Browse the repository at this point in the history
add
  • Loading branch information
skyclouds2001 authored Oct 8, 2024
1 parent e899c62 commit a28ce29
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion files/en-us/web/api/idle_detection_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ status:
browser-compat: api.IdleDetector
---

{{securecontext_header}}{{DefaultAPISidebar("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{DefaultAPISidebar("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The Idle Detection API provides a means to detect the user's idle status, active, idle, and locked, specifically, and to be notified of changes to idle status without polling from a script.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/idledetector/change_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.IdleDetector.change_event
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`change`** event of the {{domxref("IdleDetector")}} interface fires when the value of `userState` or `screenState` has changed.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/idledetector/idledetector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.IdleDetector.IdleDetector
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`IdleDetector()`** constructor creates a new {{domxref("IdleDetector")}}
object which provides events indicating when the user is no longer interacting
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/idledetector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ status:
browser-compat: api.IdleDetector
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`IdleDetector`** interface of the {{domxref('idle_detection_api','Idle Detection API','','true')}} provides methods and events for detecting user activity on a device or screen.

Expand All @@ -34,7 +34,7 @@ This interface requires a secure context.

## Static methods

- [`IdleDetector.requestPermission()`](/en-US/docs/Web/API/IdleDetector/requestPermission_static) {{Experimental_Inline}}
- {{domxref("IdleDetector/requestPermission_static", "IdleDetector.requestPermission()")}} {{Experimental_Inline}}
- : Returns a {{jsxref('Promise')}} that resolves when the user has chosen
whether to grant the origin access to their idle state. Resolves with
`"granted"` on acceptance and `"denied"` on refusal.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/idledetector/screenstate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.IdleDetector.screenState
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`screenState`** read-only property of the {{domxref("IdleDetector")}} interface
returns a string indicating whether the screen is locked, one of `"locked"` or
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/idledetector/start/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.IdleDetector.start
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`start()`** method of the {{domxref("IdleDetector")}} interface returns a
{{jsxref("Promise")}} that resolves when the detector starts listening for changes in the
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/idledetector/userstate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status:
browser-compat: api.IdleDetector.userState
---

{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}
{{securecontext_header}}{{APIRef("Idle Detection API")}}{{SeeCompatTable}}{{AvailableInWorkers("window_and_dedicated")}}

The **`userState`** read-only property of the {{domxref("IdleDetector")}} interface returns a string indicating whether the user has interacted with the device since the call to `start()`.

Expand Down

0 comments on commit a28ce29

Please sign in to comment.