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

193
Views
Obtener elemento en un documento HTML dentro de otro documento HTML

Estoy tratando de escribir una extensión de Chrome que pueda leer una URL que está oculta en el documento html de una página web específica. En algún lugar del HTML hay un 'iframe de cambio de tamaño' con la etiqueta 'd2l-iframe-wrapper-for-react', que tiene un atributo 'src' que quiero leer (ver imagen inferior). Sin embargo, usar document.getElementsByTagName no funciona, y sospecho que se debe a que en algún lugar del documento HTML hay un iframe que contiene un documento HTML y ese contiene el elemento que necesito (ver imagen superior). Mi pregunta es: ¿cómo obtengo este elemento de este documento HTML interno?

Necesito algo como esto:

 var innerDocumentWrappingDiv = document.getElementsByClassName('d2l-fra-iframe')[0]; var innerDocument = innerDocumentWrappingDiv.firstChild; // the iframe containing the document var elementThatIsNeeded = innerDocument.getElementsByTagName("d2l-iframe-wrapper-for-react")[0];

Sin embargo, esto no funciona porque el documento interno no se reconoce como un documento real. ¡Cualquier ayuda es muy apreciada!

documento html

origen

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!