Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

99
Visualizações
Copying to clipboard within an iframe

I'm coding a script/extension for a browser game I'm currently playing. In the game you can press a button that automatically copies a code/string to your clipboard. I would like to modify said string.

The problem I am currently running into is that the game is hosted on a site that uses an iframe within an iframe and while I already have a working solution for the game itself (you can play the game by accessing the source url of the innermost iframe), trying to run this solution on the host site gives me the following error:

"undefined:The Clipboard API has been blocked because of a permissions policy applied to the current document. See goo.gl/EuHzyv for more details."

I have already tried the approach outlined in this post, but it doesn't work, so here is my question:

When using the solution in the linked post for nested iframes, what origin url needs to be used?

   <iframe src="url1" allow="clipboard-read; clipboard-write self [what url goes here]>
      <iframe src="url2" allow="clipboard-read; clipboard-write self [what url goes here]
         <canvas for game with button that copies something into clipboard>
      </iframe>
   </iframe>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda