Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

597
Vistas
Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context

I'm trying to copy the results of a game to the clipboard upon completion of the game, but I'm receiving the following error when running in Safari: "Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."

The following function is called when the game is finished, and the clipboard api is called towards the bottom. Every related question I've been able to find has had to do with playing audio, but I'm not sure what applies here. Thanks for any help!

function generateScoreCard () {
let result = ``;
result = result + "Circuit " + GetFormattedDate() + "\n\n";

for( var i=0; i< pastGuesses.length; i++ )
{
  console.log(pastGuesses[i].color)
  switch (pastGuesses[i].color) {
    case '#51ff45':
      result = result + '✅';
      break;
    case '#c1ff4d':
      result = result + '🟢';
      break;
    case '#fceb4c':
      result = result + '🟡';
      break;
    case '#ffa647':
      result = result + '🟠';
      break;
    case '#ff774a':
      result = result + '🟠';
      break;
    default:
      result = result + '🔴';
      break;
  }
}

var clip_result = result + " = " + numGuesses;
//await navigator.permissions.query({ name: 'clipboard-read' });
await navigator.clipboard.writeText(clip_result);

}

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda