Hacker News new | ask | show | jobs
by bendtheblock 5542 days ago
Good example of implementing a feature because it's easy to do, rather than because it has real utility. Why it's part of the HTML form spec I don't know. Was it ever useful?
1 comments

The actual button isn’t particularly useful but the DOM interface is. Firefox (and other browsers?) cache DOM entries in certain situations. This is useful if you refresh the page accidentally with a half completed comment in a text box, but less useful if you’re building a complicated webapp that assumes an initial state. A simple document.forms[0].reset() at the top of your code works wonders.
Oh wow, I never thought to use this this way.