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

231
Views
usando postMessage a través de localhost y servidor

Tengo un problema al obtener los contenidos del sitio web X del sitio web Y Tengo localhost:3000 y http://levshapiro.com

Vi un video de cómo hacerlo y escribí esto:

 // localhost:3000 ( PS built on React ) function App() { let url = "http://levshapiro.com"; useEffect(() => { let iframe = document.getElementById("iframe"); iframe.contentWindow.postMessage("HEJ", "*"); }, []) return ( <> <div className="console"> <span id="website_url">Website: {url}</span> </div> <iframe src={url} id="iframe" title="something"/> </> ) } // http://levshapiro.com window.addEventListener("message", function(message) { alert(message.data) }) // + In HTML "<h1>Hello World!</h1>"

En este video ( https://www.youtube.com/watch?v=i9nFBZ-MiuQ ) funcionó, pero a mí no. ¿Alguien podría decirme por qué?

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!