UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 614 B
{"version":3,"file":"raf.mjs","sources":["../../../../packages/utils/raf.ts"],"sourcesContent":["import isServer from './isServer'\n\nlet rAF = (fn: () => void) => setTimeout(fn, 16) as unknown as number\nlet cAF = (handle: number) => clearTimeout(handle)\n\nif (!isServer) {\n rAF = (fn: () => void) => window.requestAnimationFrame(fn)\n cAF = (handle: number) => window.cancelAnimationFrame(handle)\n}\n\nexport { rAF, cAF }\n"],"names":[],"mappings":";;IAEI,MAAM,CAAC,OAAmB,WAAW,IAAI;IACzC,MAAM,CAAC,WAAmB,aAAa;AAE3C,IAAI,CAAC,UAAU;AACb,QAAM,CAAC,OAAmB,OAAO,sBAAsB;AACvD,QAAM,CAAC,WAAmB,OAAO,qBAAqB;AAAA;;;;"}