clipboard.hasText
Whether the clipboard holds text, without reading it, so iOS shows no paste prompt. Followed while watched, in this app and others.
Verwendung
Fake platform and network behavior
import { Text, clipboard } from 'kuito';
import { assert, render, screen, test } from 'kuito/tests';
function PasteHint() {
return <Text>{clipboard.hasText.value ? 'Paste' : 'Nothing to paste'}</Text>;
}
test('the hint follows the clipboard', async () => {
await render(<PasteHint />, {
modules: { Clipboard: { hasText: true } },
fetch: () => ({ status: 200, body: '{}' }),
});
assert.ok(screen.getByText('Paste'));
});Eigenschaften und Methoden 1
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
valueschreibgeschützt | boolean | Ja | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.