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

229
Vistas
Can't I edit JS from DevTools if it was written in an HTML file with a script tag? How to edit it?

Suppose that I'm trying to change the "test" string that it doesn't appear on the console.

<body>
    <script>
        document.addEventListener("DOMContentLoaded", () =>{
            console.log("test");
        }
    </script>
</body>

I was trying to edit the Javascript code from DevTools, but I can't edit this. I googled why I couldn't edit it, and I found an answer that an HTML file can't be edit in the Sources panel.

Can't edit HTML in Chrome dev tools Sources tab

So, I was trying to delete the line "console.log("test");" from the element tab. But, the "test" string was displayed on the console.

  1. Can't I edit JS from DevTools if it was written in an HTML file with a script tag?

  2. If question one is true, is there any other way to edit it?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The Answer is no. The only way is to run the whole function in the console. But this is all temporarily. If you want to get rid of it you have to change the html. Why are you trying to change it in the DevTools? Do you have access to the files?

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