Fix #438, fix raf call in Firefox extenstion context

RAF call needs to have Window object bound as `this`.
This commit is contained in:
Juho Teperi 2020-04-19 14:51:12 +03:00
parent 4526f4d1f9
commit 66ff6ccb82
2 changed files with 19 additions and 12 deletions

View File

@ -2,16 +2,22 @@
## Unreleased
- Fixed merge-props adding `:class` property to result even if no argument
defined `:class` ([#479](https://github.com/reagent-project/reagent/pull/479))
- Fix using `:className` property together with keyword class shortcut ([#433](https://github.com/reagent-project/reagent/issues/433))
- Fix incorrect missing React key warnings with `:>` ([#399](https://github.com/reagent-project/reagent/issues/399))
### Features and changes
- Change RAtom (all types) print format to be readable using ClojureScript reader,
similar to normal Atom ([#439](https://github.com/reagent-project/reagent/issues/439))
- Old print output: `#<Atom: 0>`
- New print output: `#object[clojure.ratom.RAtom {:val 0}]`
- Still not readable by default, requires custom reader for `object` tag.
### Bugfixes
- Fixed merge-props adding `:class` property to result even if no argument
defined `:class` ([#479](https://github.com/reagent-project/reagent/pull/479))
- Fix using `:className` property together with keyword class shortcut ([#433](https://github.com/reagent-project/reagent/issues/433))
- Fix incorrect missing React key warnings with `:>` ([#399](https://github.com/reagent-project/reagent/issues/399))
- Fix `requestAnimationFrame` call in Firefox extension context ([#438](https://github.com/reagent-project/reagent/issues/438))
## 0.10.0 (2020-03-06)
Main feature of this release is to deprecate functions that are going to be

View File

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