mirror of
https://gh-proxy.org/https://github.com/tiajinsha/JKVideo
synced 2026-07-07 23:18:38 +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 ''; }
|
||
|
|
}
|