SnapDOM v2.23.0 — Safari's triple-capture hack is gone #477
tinchox5
announced in
Announcements
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We just published v2.23.0 to npm. No breaking changes — drop-in upgrade from any 2.x.
🦁 The Safari warmup is gone
Since the early days, snapDOM carried a piece of technical debt I never liked: on Safari, every session started with a 3× pre-capture warmup — the same element was captured three times behind the scenes just to work around WebKit's svg-as-image bugs (fonts and nested images not painting on the first draw, WebKit #219770).
It worked, but it made first captures on Safari noticeably slower than everywhere else. That debt is now paid:
toCanvasnow does a verified draw: it probe-checks that the SVG actually painted ink before drawing it, bounded to ~600ms worst case. No wasted captures, no cold-start penalty.toSvg/toImgwithscale,widthorheightnow stay vector on Safari instead of falling back to PNG rasterization — sharper output and less work.This matters beyond Safari on macOS: every browser on iOS (Chrome, Firefox, Edge, all of them) runs on WebKit, so they all benefit.
It's a big behavioral change in a tricky corner of WebKit, verified against real Safari — but if you hit any regression on Safari/iOS captures, please open an issue. I'm watching this one closely.
🛠 Fidelity fixes
@font-facedeclarations without semicolons now parse correctly (#475)content: url())preCacheprefetches mask and border-image URLs::first-lettermaterialization no longer false-positives on margined elements🙏 Thanks
Huge thanks to our two new contributors this cycle: @RexSkz (#475) and @mcdyzg (#476) — first PRs, both fixing real-world capture bugs. Welcome aboard!
Full changelog: v2.22.0...v2.23.0
All reactions