In direct response to a button click I call this function
async onClick() {
const { pingEndpoint } = this.props;
const button = `<img src="${pingEndpoint}" height="1" width="1" style="border: 0px"/>`;
const blob = new Blob([button], { type: "text/html" });
const clipboardItem = new window.ClipboardItem({ "text/html": blob });
try {
await navigator.clipboard.write([clipboardItem]);
this.setState({
copied: true,
});
} catch (err) {
console.error("Could not copy text: ", err);
}
}
I get the error:
The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://permanently-removed.invalid for more details.
Looking at the Jira connect iframe I find:
allow-downloads
allow-forms
allow-modals
allow-popups
allow-popups-to-escape-sandbox
allow-scripts
allow-same-origin
allow-top-navigation-by-user-activation
allow-storage-access-by-user-activation
but not
allow-clipboard-write
That means, no clipboard writing within a connect app, right?