Trying to pause the webGL process but I can't

Hi. I’m working on a game. I have an HTML button to enter fullscreen and start the main webGL process. I set the drawing loop like requestAnimationFrame(drawScene). with the cnditional if(fullscreen) so when the browser is not fullscreen it should stop processing the main app, but even if it stop showing the animation, the object translations are still being computed.