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

92
Visualizações
How to access the DOM of a Contentful page with a bookmarklet?

After a page like this is fully loaded https://app.contentful.com/spaces/.../entries/... (an internal customized company page for editing a page on a site), I easily can access elements and text like this from the console:

document.querySelectorAll("p[data-test-id='cf-ui-paragraph']")[8].textContent;

But using the same query in a bookmarklet fails on the very first line -- even after the page is fully loaded.

javascript:(function() {
    var path = document.querySelectorAll("p[data-test-id='cf-ui-paragraph']")[8].textContent;
    //
    //
})();

Uncaught TypeError: Cannot read properties of undefined (reading 'textContent')

This seems to be a common issue but all I've seen here is the fact that it's 'not the same DOM'.

Any wisdom on how to get this (or any query at all) working on a Contentful backend editor page?

about 4 years ago · Juan Pablo Isaza
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