async function readFromClipboard() {
    if (helpers.isChrome()) {
        await setupOffscreenDocument("offscreen/offscreen.html");

        const response = await chrome.runtime.sendMessage({
            type: "read-from-clipboard",
            target: "offscreen-doc",
        });

        if (response.status != "ok") {
            console.error(
                "failure reading from clipboard in offscreen document",
                response.message || undefined
            );
            return;
        }

        return response.message;
    } else {
        return clipboard.readFromClipboard();
    }
}
Read plain text from clipboard

@since 3.2.0

@return string The current plaintext content of the clipboard