dom-types
dom-types copied to clipboard
Laziness & mutable data structure
About this line:
(register-printer js/DocumentFragment 'js/DocumentFragment #(map hiccupize (.-children %)))
The laziness of the returned sequence means that if the output value is not eagerly consumed in a timely manner, the value might not be consistent with the state of the DOM at a given point in time, because the DOM can be mutated.
To be safe, I suggest to change it to:
(register-printer js/DocumentFragment 'js/DocumentFragment #(seq (mapv hiccupize (.-children %))))