To get accurate pixel dimensions, we want to encourage the use of resizeObserver + fireOnEveryPaint, but this only fires when there is a paint invalidation. Some effects, like a webgl ripple effect, need to run every frame, but raf doesn't have the accurate pixel size information. We can solve this by adding an invalidatePaint() function on canvas which causes fireOnEveryPaint to call, and the pattern would be to setup a raf loop that always calls invalidatePaint.
This functionality isn't needed immediately (a workaround is to modify the background color of canvas in the raf loop), but this would be good to add for efficiency.