mirror of
https://github.com/tiajinsha/JKVideo.git
synced 2026-04-04 22:49:02 +08:00
8 lines
338 B
TypeScript
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 ''; }
|
|
}
|