Skip to content

Commit

Permalink
fix: remove unsupported argument (remove since Chrome 70+)
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Sep 16, 2024
1 parent 45bd7ad commit 60299ca
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/composables/useDocumentFullscreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ import { createSharedComposable } from '@vueuse/core'
import { readonly, ref, onBeforeMount, onBeforeUnmount } from 'vue'
import type { Ref, DeepReadonly } from 'vue'

interface WebkitElement extends Element {
ALLOW_KEYBOARD_INPUT: FullscreenOptions;
}

/**
* Composable to check whether the page is displayed at fullscreen
* @return {DeepReadonly<Ref<boolean>>} - computed boolean whether the page is displayed at fullscreen
Expand Down Expand Up @@ -45,7 +41,7 @@ export async function enableFullscreen() {
if (element.requestFullscreen) {
await element.requestFullscreen()
} else if (element.webkitRequestFullscreen) {
await element.webkitRequestFullscreen((Element as unknown as WebkitElement).ALLOW_KEYBOARD_INPUT)
await element.webkitRequestFullscreen()
}
}

Expand Down

0 comments on commit 60299ca

Please sign in to comment.