Files
pdfcraft/crates/js
FredAppsandPeter Yatsyshin f56a146b22 feat(js): timers keep and fire in the document's script realm (#169)
Ported from #4751 by @pyatsysh onto #5699's per-document realm.

`app.setInterval` and `app.setTimeOut` (an expression or a function) are
kept by the retained realm and reported in every Outcome (`timers`); the
caller owns the clock and fires one by running a Job with `timer` set, in
the realm that set it. `clearInterval`/`clearTimeOut` forget one. Bounds
kept from #4751: at most 64 timers per document, periods of at least
10 ms. A one-off run keeps none (the functions return an inert object, as
before), and changed document scripts start a realm without the old
timers.

Co-authored-by: Peter Yatsyshin <p.yatsyshin@googlemail.com>
2026-11-11 10:39:13 +01:00
..