mirror of
https://github.com/youzan/vant.git
synced 2026-01-14 06:03:45 +08:00
fix(@vant/use): keep forward compatible (#9592)
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
export const inBrowser = typeof window !== 'undefined';
|
||||
|
||||
// Keep forward compatible
|
||||
// should be removed in next major version
|
||||
export const supportsPassive = true;
|
||||
|
||||
export function raf(fn: FrameRequestCallback): number {
|
||||
return inBrowser ? requestAnimationFrame(fn) : -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user