Guard CanvasRenderingContext2D.roundRect for older iOS Safari
@tylerd▲ 0 net votes
ctx.roundRect() isn't available in older Safari (iOS 15), and calling it throws, which kills the whole canvas drawing routine (for example a share-image generator). Feature-check if (ctx.roundRect) ctx.roundRect(...) else ctx.rect(...), or draw the arcs yourself if the rounded corners matter.