Back to API Reference
Interface

IAsyncClipboardProvider

abstract

Opt-in extension for clipboard providers that cannot (or should not) read on the caller's thread — WebGL where navigator.clipboard returns Promises, Linux where reads spawn a subprocess. Callers probe via as IAsyncClipboardProvider; providers without it fall through to the sync path wrapped in FromResult<TResult>.

public abstract Task<string> GetTextAsync()

Async read for format. On WebGL requires a user-activation context (button click / keyboard handler); resolves to on permission denial or unsupported format.

public abstract Task<bool> HasFormatAsync()

Async availability probe. WebGL returns the sync cached answer; true async check would require user activation.

public abstract Task<IReadOnlyList<ClipboardItem>> GetItemsAsync()

Reads every present format of formats in ONE underlying clipboard access. This is the paste pipeline's async entry: on WebGL a single navigator.clipboard.read() already carries all types, and per-format reads there burn the transient user activation after the first (Safari / Firefox reject reads 2..n and Safari shows a paste prompt per read). Resolves to the items found — possibly empty, never.