+ 8
[JS] Losing work / edits due to crashes? [TIP]
SL can spontaneously reset* if you leave rogue timers. You should clear them ALL when visitors leave: function frame(timestamp) { ... } var myTO = setTimeout(frame, 17); var myIV = setInterval(frame, 17); var myAF = requestAnimationFrame(frame); // Fires when leaving [Output] window.onbeforeunload = function() { clearTimeout(myTO); clearInterval(myIV); cancelAnimationFrame(myAF); } * A completely sane response.
1 Odpowiedź
0
its ok