WebExt pageAction icon caching issue

Is there a way to extend the lifetime of objects stored in the icon cache? I’m trying to animate a page action by changing the icon every ~16ms in a loop. It’s triggered by user action and doesn’t repeat, so it only runs for around half a second.

The frames are in an SVG with a fragment identifier #0 -> #25 for each frame. Initially, I tried setting that path directly, but it wasn’t reliable, so I preload them when the extension starts, render them on a canvas and store the ImageData.

It does work, but the first time it’s triggered, the images don’t load fast enough and all the frames are skipped. Then, presumably whilst they’re cached, it’s fine, but the next time it’s triggered, they’ve been cleared(?) and it’s back to square one.