🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.javascript
Article #23

recursive requestAnimationFrame

#23
From: Mikko
Date: Mon, 09 Nov 2026 11:22
20 lines
1862 bytes
I'm making a game with animation. With a debugger I found that the
function requestAnimationFrame is recursive. My animation function
ends with the call
   requestAnimationFrame(animate);
if there is more to animate. I put a breakpoint to the animation
function at a point that is not executed always but only when
the display is wrong. At the breakpoint I noticed that the call
stack has a long list of "requestAnimationFrame" so it seems to
be recursive.

Is requestAnimationFrame really recursive? I'm using Safari. Is
the function recursive on other browsers? Can it cause a stack
full exception?

I still havn't identified my bug but it seems to be unrelated to
the recursiveness of requestAnimationFrame.

-- 
Mikko
Technical Details
Message-ID: <11csaeg$169bs$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Mikko <mikko.levanto@iki.fi>
Newsgroups: comp.lang.javascript
Subject: recursive requestAnimationFrame
Date: Mon, 9 Nov 2026 13:22:54 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <11csaeg$169bs$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 09 Nov 2026 11:22:56 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1254780"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/nLbYQW87J1eCJ2s9j1MJk"; posting-host="2992aedbb81bd72775498ebd34e66299"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:M/8aGrBLyCOu24/x5ugl5ClHINw= sha256:/H0jhNfHgEimrneEJkNp0K9vlL6wJGIM5LqKjYDY48g=
	sha1:PVtcyeIu4ow26sbE9ETQdponIRI= sha256:iyoIzgG5r3xOGcb/5vJqgwzI9EOZ9t5g+wkyrhVLQE8=