Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!