In an iframe that is from a different origin than its parent, I want to optionally display a 'copy' button if I detect that the iframe has clipboard-write permission. How do I check within the iframe if it has that permission?
I thought I could use Window.frameElement, get the iframe, and check its attributes to do so. However, Window.frameElement gives null, because "the document into which it's embedded has a different origin" - https://developer.mozilla.org/en-US/docs/Web/API/Window/frameElement