PageSourceSearch

https://www.elle.cz/js/core/rafScheduler.js

js elle.cz collected 2026-10-02 07:55:42 UTC 465 bytes, 30 lines download raw bytes

1export function createRafScheduler(callback) {
2  let frameId = 0;
3
4  const cancel = () => {
5    if (!frameId) {
6      return;
7    }
8
9    window.cancelAnimationFrame(frameId);
10    frameId = 0;
11  };
12
13  const flush = () => {
14    cancel();
15    callback();
16  };
17
18  const schedule = () => {
19    if (frameId) {
20      return;
21    }
22
23    frameId = window.requestAnimationFrame(() => {
24      frameId = 0;
25      callback();
26    });
27  };
28
29  return {schedule, cancel, flush};
30}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.