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

200
Views
No puedo vincular la ventana emergente de mi extensión (archivo html) y el archivo javascript usando onclick()

No puedo vincular el archivo HTML de mi extensión con JS. El resultado que esperaba era que la línea h4 cambiaría a "no skipper". He estado probando la función onclick , leí que necesitaba usar .addEventListener() pero no pude hacerlo funcionar.

La página web funciona cuando la pruebo como una página web real usando un servidor en vivo, pero falla cuando intento usarla en una extensión.

Quería saber cómo corregir mi error onclick() y cómo usar .addEventListener() para este archivo de código Manifest.json

 { "manifest_version": 2, "name": "Skipper", "version": "1.0", "description": "Does something", "browser_action": { "default_icon": "stuff/potato.jpg", "default_popup": "popup.html", "default_title": "Skipper!" }, "icons": { "48": "stuff/potato.jpg" }, "permissions": [ "activeTab" ], "content_scripts": [ { "matches": [""http://*/*","https://*/*"], "js": ["pop.js"] } ] }

Este es el HTML de mi extensión que está en el directorio adecuado

 <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Skipper</title> </head> <body> <h4 id="help">Skipper</h4> <button onclick="func()">Reload</button> </body> <script src="pop.js"></script> </html>

Este es mi archivo JS

 function func() { var change=document.getElementById("line").innerHTML="not skipper"; return change; }
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!