Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

195
Visualizações
EventListener to determine when data-src changes to src

So I've been messing with a piece of code for some time now, and I can't seem to properly determine when data-src changes to src - So I want to see if I can hook a EventListener to an element and see if we can properly determine it then.

So let's say that I have the following element let iframe = videoWrapper.html(videoElement).children('iframe'); which gives me:
enter image description here

Which renders like this:
enter image description here

Please note: A third-party implementation changes the data-src to src dynamically based on various actions.

Question:
What is the best approach to take to check when the data-src has switched over to src and then execute conditionals/methods? I'd like to hook a event listener to determine that, but I don't know which one would be the right approach.

All help is appreciated!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

MutationObserver The MutationObserver interface provides the ability to watch for changes being made to the DOM tree. It is designed as a replacement for the older Mutation Events feature, which was part of the DOM3 Events specification. Read more...

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda