# ClipboardControls

How the clipboard contract scripts a port. A real adapter implements these
by mocking `navigator.clipboard` and, for the fallback path, `execCommand`.

This is an interface exported by `@mapcairn/core/contracts`, checked against version 0.2.0.

## Signature

```ts
import type { ClipboardControls } from "@mapcairn/core/contracts";
 
interface ClipboardControls
```

## Methods

### willFail

```ts
willFail(reason: ClipboardContractFailure): void;
```

Makes every later copy fail the way `reason` describes.

- `reason` (`ClipboardContractFailure`)

### willSucceed

```ts
willSucceed(): void;
```

Makes every later copy succeed.

### written

```ts
written(): readonly string[];
```

The text of every copy that succeeded, oldest first.

## See also

- [`ClipboardContractFailure`](https://docs.mapcairn.com/api/core/contracts/ClipboardContractFailure.md)

Source: [packages/core/src/contracts/clipboard.contract.ts:16](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/contracts/clipboard.contract.ts#L16)
