Files
JKVideo/shims/expo-clipboard.web.ts
Developer 3f82646496 init
2026-03-26 12:15:40 +08:00

8 lines
338 B
TypeScript

/** Web shim for expo-clipboard - use native browser clipboard API */
export async function setStringAsync(text: string): Promise<void> {
try { await navigator.clipboard.writeText(text); } catch {}
}
export async function getStringAsync(): Promise<string> {
try { return await navigator.clipboard.readText(); } catch { return ''; }
}