3 ms·
I wonder how does it render synchronously without needing to reflow the page?
by 3rd3 3y ago
I wonder how does it render synchronously without needing to reflow the page?
- mkl 3y agoServer-side rendering will do that.
- 3rd3 3y agoSo this only refers to the server-side rendering mode, not in-browser rendering (which KaTeX supports too)?
- mkl 3y agoIf by "this" you mean "no reflowing", yes. If the maths is laid out client-side at run time, the exact dimensions of the formula are not known until the Latex code is interpreted.
- 3rd3 3y agoThanks. I was hoping there was a way to manipulate the DOM on the client before it is rendered, but this seems to be impossible with JS. Currently, I render various things during page load with NodeObserver. It mostly performs well on modern devices, but it can get sluggish on very large HTML pages (like 5MB+ of HTML code), so it looks like I have to resort to infinite scrolling with automatic unloading.