This should be possible in both backends, maybe we can place this in the `util` module. Last time I looked into this it seemed to require some JS interaction but I'm not sure. Needs investigation.