async function getClipboardContents() {
try {
const clipboardItems = await navigator.clipboard.read();
for (const clipboardItem of clipboardItems) {
console.log(clipboardItem.presentationStyle);
}
} catch (err) {
console.error(err.name, err.message);
}
}ClipboardItem: presentationStyle property / notebook
ClipboardItem: presentationStyle property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.