Is it possible to write to window.localstorage in webgl? That or access PlayerPrefs from regular javascript.
Worked it out (sort of). The answer lies here: https://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html