The piece argues that iOS Safari’s 60 Hz limit on ordinary JavaScript rendering makes otherwise polished mobile web interactions feel less fluid than native apps, even on 120 Hz displays. Its workaround uses a hidden, scrollable area as an input controller: scrolling is handled by the compositor, so its position can be sampled more frequently than normal touch events or scroll events allow. A timed MessageChannel loop synchronized to display refresh, an empty requestAnimationFrame loop, and a tiny background scroller raise readings from roughly 80 to 120 distinct positions per second. Scaling the scroll surface by device pixel ratio preserves sub-point movement. The controller can also supply native momentum, bounce, and snapping, though simpler interactions can use passive touch listeners.
High-frequency input alone is not enough if the page still renders at 60 Hz. The key finding is that an OffscreenCanvas created with transferControlToOffscreen can present frames without waiting for WebKit’s usual rendering pass, enabling 120 Hz canvas output without changing Safari’s developer settings or using private APIs. The author combines controllers and OffscreenCanvas workers to build responsive, native-like interfaces, including a Liquid Glass tab bar and effects. For the glass effect, a page snapshot becomes a WebGL texture, which is updated as content moves and sampled by shaders. The approach can keep computation off the main thread, but high-refresh rendering should be activated only when animations or interactions need it.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.