We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8960548 commit 4973a5dCopy full SHA for 4973a5d
src/exitFullscreen.ts
@@ -0,0 +1,8 @@
1
+export function exitFullscreen() {
2
+ const el: any = (parent as any).documentElement
3
+ const cfs = el?.cancelFullScreen || el?.webkitCancelFullScreen || el?.mozCancelFullScreen || el?.exitFullScreen;
4
+ if (cfs)
5
+ cfs.call(el);
6
+ else
7
+ alert("切换失败,可尝试Esc退出")
8
+}
0 commit comments