featherbit UI
    Preparing search index...

    Interface ClipboardEnv

    Copying text without assuming a secure context.

    The async Clipboard API (navigator.clipboard) is only exposed in secure contexts — HTTPS, or localhost. An admin UI served over plain HTTP on an IP has no clipboard object at all, so a bare navigator.clipboard.writeText(...) throws Cannot read properties of undefined (reading 'writeText') rather than failing in any way the caller can act on.

    The legacy document.execCommand('copy') path is not gated that way and still works there, so it is tried before giving up. It is deprecated, but it is the only thing standing between a plain-HTTP admin origin and a copy button that cannot copy.

    interface ClipboardEnv {
        execCopy?: (text: string) => boolean;
        writeTextAsync?: (text: string) => Promise<void>;
    }
    Index
    execCopy?: (text: string) => boolean

    Legacy selection-based copy. Returns whether it succeeded.

    writeTextAsync?: (text: string) => Promise<void>

    navigator.clipboard.writeText, when the browser exposes it.