logoalt Hacker News

heavensteeth • today at 9:10 AM • 1 reply • view on HN

   <button class="nav-btn" onclick="navigateToPage('index.html')">Home</button>

   ... 

   // Navigation functionality
   function navigateToPage(filename) {
       window.location.href = filename;
   }
What shockingly poor code. Just disgraceful.

This is bad for accessibility, bad for compatibility, and serves no purpose at all.


Replies

arcanemachiner • today at 9:40 AM

Ha, that is bad. This is what happens when you use the cheap LLMs. (At least, I hope Opus 5.5 isn't pulling stunts that are this bad... It's not that bad when I look at my code.)