I would like to programmatically allow the user to add new textures to get passed via webgl to a shader. To do this, I need a function from n to gl.TEXTUREn. It appears that gl.TEXTUREn = gl.TEXTURE0 + n, both from my own debug testing and the answer to: https://stackoverflow.com/questions/43066304/webgl2-explanation-for-gl-texture0-n
But is there anywhere this is guaranteed to be the case, regardless of setup?