mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 06:21:37 +02:00
🎉 Add comments to viewer.
This commit is contained in:
parent
e1db6d3a37
commit
64a6ba1949
45 changed files with 1629 additions and 1074 deletions
|
@ -10,6 +10,8 @@
|
|||
(ns app.util.webapi
|
||||
"HTML5 web api helpers."
|
||||
(:require
|
||||
[app.common.exceptions :as ex]
|
||||
[app.util.object :as obj]
|
||||
[promesa.core :as p]
|
||||
[beicon.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
|
@ -97,8 +99,26 @@
|
|||
|
||||
(defn request-fullscreen
|
||||
[el]
|
||||
(.requestFullscreen el))
|
||||
(cond
|
||||
(obj/in? el "requestFullscreen")
|
||||
(.requestFullscreen el)
|
||||
|
||||
(obj/in? el "webkitRequestFullscreen")
|
||||
(.webkitRequestFullscreen el)
|
||||
|
||||
:else
|
||||
(ex/raise :type :not-supported
|
||||
:hint "seems like the current browset does not support fullscreen api.")))
|
||||
|
||||
(defn exit-fullscreen
|
||||
[]
|
||||
(.exitFullscreen js/document))
|
||||
(cond
|
||||
(obj/in? js/document "exitFullscreen")
|
||||
(.exitFullscreen js/document)
|
||||
|
||||
(obj/in? js/document "webkitExitFullscreen")
|
||||
(.webkitExitFullscreen js/document)
|
||||
|
||||
:else
|
||||
(ex/raise :type :not-supported
|
||||
:hint "seems like the current browset does not support fullscreen api.")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue