Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

213
Views
Chrome se niega a ejecutar el script html en una extensión de Chrome

Estoy tratando de hacer una extensión de Chrome que almacene texto localmente usando la API chrome.storage como una especie de administrador de contraseñas. (Sé que Chrome tiene uno incorporado, pero esto es solo para practicar) Pero Chrome se niega a ejecutar el script que se ejecuta cuando se envía el formulario para el texto.

HTML:

 <!DOCTYPE html> <html lang="en"> <head> <style> text { font-size: 30px; } </style> </head> <body> <div class="text"> <p>Totally 100% secure password manager</p> </div> <form action="post" autocomplete="off" id="Form"> <input type="text" name="password" id="Text" /> </form> <script> //Executes when the html form is submitted document.getElementById("Form").addEventListener("submit", function () { chrome.storage.local.set( { password: document.getElementById("Text").value }, function () { console.log( "Password stored: " + document.getElementById("Text").value ); } ); }); </script> </body> </html>

Chrome da el error "Se negó a ejecutar el script en línea porque viola la siguiente directiva de Política de seguridad de contenido: "script-src 'self'". O la palabra clave 'inseguro en línea', un hash ('sha256-72rWUAkaANWFYjYfF6GlHKHpaIoOaw6UP63fa2/0VAQ=') , o se requiere un nonce ('nonce-...') para habilitar la ejecución en línea". Soy nuevo en el desarrollo tanto en HTML como en JavaScript, por lo que agradecería la ayuda.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!