Fix RAF bind on Node

This commit is contained in:
Juho Teperi 2020-04-19 21:33:58 +03:00
parent e2f3717d93
commit 2f2574fd67
1 changed files with 6 additions and 6 deletions

View File

@ -14,15 +14,15 @@
(js/setTimeout f 16))
(def next-tick
(.bind (if-not is-client
fake-raf
(let [w js/window]
(or (.-requestAnimationFrame w)
(if-not is-client
fake-raf
(let [w js/window]
(.bind (or (.-requestAnimationFrame w)
(.-webkitRequestAnimationFrame w)
(.-mozRequestAnimationFrame w)
(.-msRequestAnimationFrame w)
fake-raf)))
js/window))
fake-raf)
w))))
(defn compare-mount-order
[^clj c1 ^clj c2]