UNPKG

@tef-novum/webview-bridge

Version:

JavaScript library to access to native functionality. Requires a webview with a postMessage bridge.

13 lines (12 loc) 650 B
/** * These functions try to use the Web Clipboard API if available, otherwise fall back to the bridge * implementation in native apps. * * According to the tests done, the Web Clipboard API works fine in iOS webviews but fails with a permissions * error in Android in some cases. Also, old versions of Chrome in Android may not have support for the Web * Clipboard API at all. * * We have decided to not implement the bridge method in iOS apps, as the Web Clipboard API works fine. */ export declare const readTextFromClipboard: () => Promise<string>; export declare const writeTextToClipboard: (text: string) => Promise<void>;