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

128
Visualizações
How can I read the console of a window object in Javascript?

My school has blocked the inspect feature on our computers, which makes it incredibly hard to debug a project while I'm at school. I an looking to create a simple website (because that seems like that's the only thing my school will allow me to do anymore) that will open a website, then output all errors/warnings/console logs to a DOM element. I know how to open a window and store it in a variable, but I'm not sure where to start to read from the console's output. I am also wondering how I would detect when something is added to the console, as the new window will be on a new domain and we all know that CORS will have a fit if we try to do anything to it (like add an event listener to it?).

var newWindow = window.open("https://google.com");

newWindow.addEventListener("consoleupdate", consoleText => { // <-- What would I put here instead?
    document.getElementById("output").textContent = consoleText;
});

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