Wake Lock

Reactive Screen

Wake Lock API.

Usage

<script>
    import { wakeLock } from "@sveu/browser"

    const { supported, active, request, release } = wakeLock()
</script>
<script>
    import { wakeLock } from "@sveu/browser"

    const { supported, active, request, release } = wakeLock()
</script>
svelte

API

Returns

Name Description Type
supported Is the Wake Lock API supported Readable<boolean>
active Is the Wake Lock active Readable<boolean>
request Request a Wake Lock (type: WakeLockType) => void
release Release the Wake Lock () => void