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

192
Vistas
Get element in an HTML document within another HTML document

I am trying to write a Chrome extension that can read a url that is hidden in the html document of a specified webpage. Somewhere in the HTML is a 'resizing-iframe' with the tag 'd2l-iframe-wrapper-for-react', which has a 'src' attribute that I want to read (see bottom picture). However, using document.getElementsByTagName doesn't work, and I suspect it is because somewhere in the HTML document, there is an iframe that itself contains an HTML document, and that one contains the element that I need (see top image). My question is: how do I get this element from this inner HTML document?

I need something like this:

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]; 

However this doesn't work because innerDocument is not recognized as an actual document. Any help is much appreciated!

html doc

src

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